#C9988. Single Even Element Transformation
Single Even Element Transformation
Single Even Element Transformation
You are given an array of N integers. You can transform the array by removing elements until only one element remains. The twist is that you are allowed to keep only one of the original elements without performing any modification; you cannot combine or change the value of any element.
Your task is to determine whether it is possible to obtain a single even number as the final element. In other words, check if there exists at least one even number in the array. If there is, output YES
; otherwise, output NO
.
Note: The property of even numbers is given by \( n \equiv 0 \pmod{2} \).
inputFormat
The first line contains an integer N (\(1 \leq N \leq 10^5\)), representing the number of elements in the array.
The second line contains N space-separated integers \(A_1, A_2, \ldots, A_N\) (\(|A_i| \leq 10^9\)).
outputFormat
Output a single line with the string YES
if it is possible to obtain a single even number from the array; otherwise, output NO
.
1
1
NO
</p>