Marks :30
: 13 | : 0
Given an array $$$A$$$ consisting of $$$N$$$ integers. Also given $$$Q$$$ queries along with it.In each query, you are given 3 spaced separated integers $$$L, R$$$ and $$$X$$$. You need to output the summation of XOR of $$$X$$$ with each of the array elements from range $$$L$$$ to $$$R$$$ both inclusive(1- based indexing).
The array does not change after any query.
The first line contains two integers $$$N$$$ and $$$Q$$$. The next line contains $$$N$$$ spaced separated integers $$$A_{i}$$$. The next $$$Q$$$ lines contains 3 integers each $$$L$$$,$$$R$$$ and $$$X$$$.$$$(1 \le N,Q \le 10^5)$$$$$$(1 \le A_{i},X \le 10^9)$$$$$$(1 \le L,R \le N).$$$
5 2 2 3 1 4 5 1 1 3 3 5 2
1 16
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.