이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
n, q = map(int, input().split())
a = [int(x) for x in input().split()]
for _ in range(q):
act_type, x, y = map(int, input().split())
if act_type == 1:
a[x - 1] = y
else:
res = 0
x -= 1
y -= 1
for d in range(1, y - x + 2):
total_xor_of_seq_len_d = 0
for i in range(x, y - d + 2):
total_xor_of_seq = 0
for j in range(i, i + d):
total_xor_of_seq ^= a[j]
total_xor_of_seq_len_d ^= total_xor_of_seq
res ^= total_xor_of_seq_len_d
print(res)
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |