{"id":"d08c57bf-c086-4310-abef-15f99bbbb673","name":"Xor On Segment","description":"<a href=\"https://codeforces.com/contest/242/problem/E\">https://codeforces.com/contest/242/problem/E</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\r\n static PrintWriter out = new PrintWriter(System.out);\r\n /*\r\n use in for reading input\r\n use out for printing output\r\n */\r\n\r\n public static void main(String[] args) throws IOException {\r\n\r\n // write your code here.\r\n\r\n\r\n\r\n out.close();\r\n }\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"hard","sampleInput":"5\r\n4 10 3 13 7\r\n8\r\n1 2 4\r\n2 1 3 3\r\n1 2 4\r\n1 3 3\r\n2 2 5 5\r\n1 1 5\r\n2 1 2 10\r\n1 2 3\r\n","sampleOutput":"26\r\n22\r\n0\r\n34\r\n11\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"9b3d7d76-b2ca-458f-80a8-4b37d548024a","name":"Segment Tree For Experts","slug":"segment-tree-for-experts-953","type":0},{"id":"bb26ccac-1430-4cf4-bf4a-a8b38e44b68a","name":"Xor On Segment","slug":"xor-on-segment","type":1}],"next":{"id":"9dd64f5f-7a56-47fd-a4ff-989871c94bbd","name":"Interesting Array","type":1,"slug":"interesting-array"},"prev":{"id":"45c53c89-db8d-48c0-852e-a4b303d1a89e","name":"Domino Principle","type":1,"slug":"domino-principle"}}}

Xor On Segment

<a href="https://codeforces.com/contest/242/problem/E">https://codeforces.com/contest/242/problem/E</a>

{"id":"d08c57bf-c086-4310-abef-15f99bbbb673","name":"Xor On Segment","description":"<a href=\"https://codeforces.com/contest/242/problem/E\">https://codeforces.com/contest/242/problem/E</a>","inputFormat":".","outputFormat":".","constraints":".","sampleCode":{"cpp":{"code":""},"java":{"code":"import java.io.*;\r\nimport java.util.*;\r\n\r\npublic class Main {\r\n static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));\r\n static PrintWriter out = new PrintWriter(System.out);\r\n /*\r\n use in for reading input\r\n use out for printing output\r\n */\r\n\r\n public static void main(String[] args) throws IOException {\r\n\r\n // write your code here.\r\n\r\n\r\n\r\n out.close();\r\n }\r\n}\r\n"},"ruby":{"code":""},"python":{"code":""},"javascript":{"code":""}},"points":10,"difficulty":"hard","sampleInput":"5\r\n4 10 3 13 7\r\n8\r\n1 2 4\r\n2 1 3 3\r\n1 2 4\r\n1 3 3\r\n2 2 5 5\r\n1 1 5\r\n2 1 2 10\r\n1 2 3\r\n","sampleOutput":"26\r\n22\r\n0\r\n34\r\n11\r\n","questionVideo":"","hints":[],"associated":[],"solutionSeen":false,"tags":[],"meta":{"path":[{"id":0,"name":"home"},{"id":"0c54b191-7b99-4f2c-acb3-e7f2ec748b2a","name":"Data Structures and Algorithms","slug":"data-structures-and-algorithms","type":0},{"id":"9b3d7d76-b2ca-458f-80a8-4b37d548024a","name":"Segment Tree For Experts","slug":"segment-tree-for-experts-953","type":0},{"id":"bb26ccac-1430-4cf4-bf4a-a8b38e44b68a","name":"Xor On Segment","slug":"xor-on-segment","type":1}],"next":{"id":"9dd64f5f-7a56-47fd-a4ff-989871c94bbd","name":"Interesting Array","type":1,"slug":"interesting-array"},"prev":{"id":"45c53c89-db8d-48c0-852e-a4b303d1a89e","name":"Domino Principle","type":1,"slug":"domino-principle"}}}
plane

Editor


Loading...

Xor On Segment

hard

https://codeforces.com/contest/242/problem/E

Constraints

.

Format

Input

.

Output

.

Example

Sample Input

5 4 10 3 13 7 8 1 2 4 2 1 3 3 1 2 4 1 3 3 2 2 5 5 1 1 5 2 1 2 10 1 2 3

Sample Output

26 22 0 34 11

Discussions

Show Discussion

Related Resources

related resources

Turning Off Zen Mode