Run time error for range xor problem

i have written the code for range xor, sample testcase is passing but on submitting it is giving runtime error.please help me ,link for the code: https://ide.codingblocks.com/s/225768

hey @Debugger
try to dry run the test case
5
0 3
0 5
0 10
0 6
1 1 4 6
you are getting segmentation fault

it is giving right answer as 10

@Debugger it gives segmentation error

please point in the code what wrong with it :frowning:

@Debugger
refer to this code