P1061 longest consecutive numbers

Title Description

Input positive integer n, (1 <= n <= 10000), the length of the longest required output even number. (Even number refers to small to large continuous natural number)

Input Format

The first line, a n-number;
second row, n-positive integers, separated by spaces between.

Output Format

A number, a maximum number of consecutive numbers.

Sample input

10
3 5 6 2 3 4 5 6 8 9

Sample Output

5

Guess you like

Origin www.cnblogs.com/problems/p/P1061.html