| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 1024 MB | 0 | 0 | 0 | 0.000% |
As Farmer John feeds his cows, he plays a little game. He moves down the line of cows and looks at the unique serial number on each cow's ear tag (that's how they do it now; no brands). He tries to guess how long the longest contiguous set of even serial numbers will be. If he guesses right, he gets extra ice cream after dinner.
Given the number of cows N (1 ≤ N ≤ 100,000) and the N serial numbers in the range 1..1,000,000, find the length of the longest contiguous set of even serial numbers.
One line containing an integer that is the length of the longest contiguous set of even serial numbers.
7 1 2 4 6 3 4 12
3