#K76047. Longest Even Subsequence
Longest Even Subsequence
Longest Even Subsequence
You are given a sequence of integers representing task processing times. Your task is to determine the length of the longest contiguous subsequence in which every element is an even number.
An integer \( x \) is even if \( x \mod 2 = 0 \). In this problem, you must find the maximum length of a segment where this condition holds for every element.
Note: The input is provided through standard input (stdin) and the result should be printed to standard output (stdout).
inputFormat
The first line contains an integer \( n \) representing the number of tasks. The second line contains \( n \) space-separated integers representing the processing times of the tasks.
outputFormat
Output a single integer denoting the length of the longest contiguous subsequence in which all task processing times are even.
## sample6
3 2 4 8 7 6
3
</p>