n, q = map(int, input().split())
A = list(map(int, input().split())) # scan results
for _ in range(q):
q, i, j = map(int, input().split())
if q == 1:
# rescan
A[i-1] = j
else:
# query
if (j - i) % 2 == 1:
print(0)
else:
y = 0
for x in range(i, j+1, 2):
y ^= A[x-1]
print(y)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
18 ms |
2772 KB |
Output is correct |
2 |
Correct |
13 ms |
2772 KB |
Output is correct |
3 |
Correct |
11 ms |
2848 KB |
Output is correct |
4 |
Correct |
12 ms |
2864 KB |
Output is correct |
5 |
Correct |
12 ms |
2764 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
2912 KB |
Output is correct |
2 |
Correct |
15 ms |
2900 KB |
Output is correct |
3 |
Correct |
15 ms |
2880 KB |
Output is correct |
4 |
Correct |
28 ms |
2900 KB |
Output is correct |
5 |
Correct |
20 ms |
2900 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
18 ms |
2772 KB |
Output is correct |
2 |
Correct |
13 ms |
2772 KB |
Output is correct |
3 |
Correct |
11 ms |
2848 KB |
Output is correct |
4 |
Correct |
12 ms |
2864 KB |
Output is correct |
5 |
Correct |
12 ms |
2764 KB |
Output is correct |
6 |
Correct |
15 ms |
2912 KB |
Output is correct |
7 |
Correct |
15 ms |
2900 KB |
Output is correct |
8 |
Correct |
15 ms |
2880 KB |
Output is correct |
9 |
Correct |
28 ms |
2900 KB |
Output is correct |
10 |
Correct |
20 ms |
2900 KB |
Output is correct |
11 |
Correct |
181 ms |
3548 KB |
Output is correct |
12 |
Correct |
186 ms |
3544 KB |
Output is correct |
13 |
Correct |
782 ms |
3524 KB |
Output is correct |
14 |
Correct |
805 ms |
3496 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Execution timed out |
1064 ms |
27452 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
18 ms |
2772 KB |
Output is correct |
2 |
Correct |
13 ms |
2772 KB |
Output is correct |
3 |
Correct |
11 ms |
2848 KB |
Output is correct |
4 |
Correct |
12 ms |
2864 KB |
Output is correct |
5 |
Correct |
12 ms |
2764 KB |
Output is correct |
6 |
Correct |
15 ms |
2912 KB |
Output is correct |
7 |
Correct |
15 ms |
2900 KB |
Output is correct |
8 |
Correct |
15 ms |
2880 KB |
Output is correct |
9 |
Correct |
28 ms |
2900 KB |
Output is correct |
10 |
Correct |
20 ms |
2900 KB |
Output is correct |
11 |
Correct |
181 ms |
3548 KB |
Output is correct |
12 |
Correct |
186 ms |
3544 KB |
Output is correct |
13 |
Correct |
782 ms |
3524 KB |
Output is correct |
14 |
Correct |
805 ms |
3496 KB |
Output is correct |
15 |
Execution timed out |
1064 ms |
27452 KB |
Time limit exceeded |
16 |
Halted |
0 ms |
0 KB |
- |