Can someone please help me with it's solution

Note: This problem has been asked in one of the online coding challenges.

Given an array A of size N. You are asked Q queries. There will be two types of queries:

1 L R K: Print “Yes” if the subarray A[L, R] can be split into K contiguous subarrays such that each of these K subarrays have a subarray XOR with odd number od set bits. Otherwise, print “No”.

2 L X: Update A[L] = X .

1 <= A[i] <= 1e9
1 <= L, R, K <= N
1 <= N, Q <= 1e5


Tell me if you still need help.

1 Like

Can you provide me a solution?

Can u pl explain that approach ?