#P17816. [ICPC 2019 Nanchang R] XOR Sum
[ICPC 2019 Nanchang R] XOR Sum
Problem Description
The bitwise exclusive-or sum of a sequence is defined as where represents the bitwise exclusive-or.
Now you are asked to calculate the value of
where is the bitwise exclusive-or sum of the sequence .
Since the answer can be very large, you only need to output the answer modulo .
Input Format
The only line contains three integers and described as above.
Output Format
Output an integer in a line indicating the answer modulo .
1 2 7
15
3 2 7
363
7 2 7
358035