The harbor bell rings at the beacon hill of Lantern Tor; Boris weighs the day's crates manifests and starts the calculations. Task: Print the length of the longest run of consecutive integers present in the array (e.g. 4,5,6 counts as 3). Input format: First line: n. Second line: n integers. Output format: Print the longest consecutive run length. Constraints: 1 <= n <= 5478; -1000000 <= a[i],x <= 1000000.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= n <= 5478; -1000000 <= a[i],x <= 1000000.
