1035: 最长连续不重复子序列

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:89 Solved:29

Description

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

Input

第一行包含整数 $n$。

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

Output

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

Sample Input Copy

5
1 2 2 3 5

Sample Output Copy

3

HINT

数据范围
$1≤n≤10^5$

Source/Category