You have been given an array consisting of n numbers and queries to it:
After each request, check the parity of the array sum.
The first line contains two natural numbers, n,q(1≤n,q≤2∗105).
The array elements are indicated in the next line, ai(1≤ai≤109).
The next q lines contain queries, li,ri,xi(1≤li≤ri≤n),(1≤xi≤109).
For each query, print Yes if the array sum is even, and No otherwise.
5 3 1 2 3 4 5 1 2 3 1 5 1 4 4 9
Yes No No
5 5 12 23 34 45 56 3 5 67 2 4 78 1 3 89 2 5 90 1 1 1
Yes No Yes No No
Login to be able to submit.
Problem | ||
---|---|---|
A | KEPPEK | 65 |
B1 | Orifhon and Notcoin trading #1 | 60 |
B2 | Orifkhon and Notcoin trading #2 | 20 |
C | HTML editor | 3 |
D | Make equal | 36 |
E1 | Changes #1 | 36 |
E2 | Changes #2 | 18 |
F | Me first | 14 |
G | P-power divisor | 3 |
H | Secret message | 2 |
I | Hypermarket | 0 |
J | Arena results #2 | 2 |