A. 最长连续不重复子序列

    Type: Default 1000ms 256MiB

最长连续不重复子序列

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

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

Format

Input

第一行包含整数 nn

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

Output

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

Samples

5
1 2 2 3 5
3

Limitation

1n1051≤n≤10^5