n, q = map(int, input().split())
a = [int(x) for x in input().split()]
for _ in range(q):
t, x, y = map(int, input().split())
if t == 1:
a[x - 1] = y
else:
x -= 1
y -= 1
ans = 0
for l in range(1, n + 1):
cur_xor = 0
for i in range(n - l + 1):
sub_xor = 0
for j in range(i, i + l):
sub_xor ^= a[j]
cur_xor ^= sub_xor
ans ^= cur_xor
print(ans)
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
169 ms |
19360 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1092 ms |
20560 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
169 ms |
19360 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Execution timed out |
1085 ms |
38904 KB |
Time limit exceeded |
2 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Incorrect |
169 ms |
19360 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |