CF1807D Odd Queries

Description

You have an array $ a_1, a_2, \dots, a_n $ . Answer $ q $ queries of the following form: - If we change all elements in the range $ a_l, a_{l+1}, \dots, a_r $ of the array to $ k $ , will the sum of the entire array be odd? Note that queries are independent and do not affect future queries.

Input Format

N/A

Output Format

N/A

Explanation/Hint

For the first test case: - If the elements in the range $ (2, 3) $ would get set to $ 3 $ the array would become $ \{2, 3, 3, 3, 2\} $ , the sum would be $ 2+3+3+3+2 = 13 $ which is odd, so the answer is "YES". - If the elements in the range $ (2, 3) $ would get set to $ 4 $ the array would become $ \{2, 4, 4, 3, 2\} $ , the sum would be $ 2+4+4+3+2 = 15 $ which is odd, so the answer is "YES". - If the elements in the range $ (1, 5) $ would get set to $ 5 $ the array would become $ \{5, 5, 5, 5, 5\} $ , the sum would be $ 5+5+5+5+5 = 25 $ which is odd, so the answer is "YES". - If the elements in the range $ (1, 4) $ would get set to $ 9 $ the array would become $ \{9, 9, 9, 9, 2\} $ , the sum would be $ 9+9+9+9+2 = 38 $ which is even, so the answer is "NO". - If the elements in the range $ (2, 4) $ would get set to $ 3 $ the array would become $ \{2, 3, 3, 3, 2\} $ , the sum would be $ 2+3+3+3+2 = 13 $ which is odd, so the answer is "YES".