| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 3 초 | 128 MB | 38 | 7 | 6 | 25.000% |
You have an integer array $A = [a_0, a_1, \ldots, a_{2^m-1}]$ of length 2ドル^m$. Initially, the array consists of zeros.
You also have an integer variable $x$. Initially, $x = 0$.
For each $i = 1, 2, \ldots, n,ドル you are given two integers $p_i$ and $q_i,ドル and you have to perform the following steps:
Find the value of $x \bmod 2^{30}$ at the end of this process.
The first line contains two integers $n$ and $m$ (1ドル \le n \le 500,000円$; 1ドル \le m \le 30$).
The $i$-th of the following $n$ lines contains two integers $p_i$ and $q_i$ (0ドル \le p_i, q_i < 2^m$).
Print the value of $x \bmod 2^{30}$.
5 2 2 1 1 3 3 2 1 0 0 2
87
In the example test, initially, $A = [0, 0, 0, 0]$ and $x = 0$. Then: