- Time Limit -------------------1 second
- Memory limit------------------64Mb
Input standard input or input.txt
Output standard output or output.txt
It is required to find the longest sequence of units in the binary vector and print its length.
It is advisable to get a solution that works in linear time and at the same time passes through the input array only once. Input format
The first line of the input file contains one number n, n ≤ 10000. Each of the next n lines contains exactly one number - the next element of the array. Output format
The output file must contain a single number - the length of the longest sequence of units in the input array.