2020: the longest continuous non repeating subsequence

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:57 Solved:23

Description

给定一个长度为 n 的整数序列,请找出最长的不包含重复的数的连续区间,输出它的长度。

Input

第一行包含整数 n
第二行包含 n 个整数(均在 0∼100000范围内),表示整数序列。

Output

共一行,包含一个整数,表示最长的不包含重复的数的连续区间的长度。

Sample Input Copy

10
9 3 6 9 5 10 1 2 3 9

Sample Output Copy

7

HINT

数据范围:
0<n<=100000

Source/Category