답안 #848441

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
848441 2023-09-12T15:58:16 Z MinhQNgo XORanges (eJOI19_xoranges) PyPy 3
12 / 100
1000 ms 39084 KB
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)
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19776 KB Output is correct
2 Correct 46 ms 20272 KB Output is correct
3 Correct 41 ms 19764 KB Output is correct
4 Correct 72 ms 20996 KB Output is correct
5 Correct 68 ms 20780 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1037 ms 20216 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19776 KB Output is correct
2 Correct 46 ms 20272 KB Output is correct
3 Correct 41 ms 19764 KB Output is correct
4 Correct 72 ms 20996 KB Output is correct
5 Correct 68 ms 20780 KB Output is correct
6 Execution timed out 1037 ms 20216 KB Time limit exceeded
7 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1027 ms 39084 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 39 ms 19776 KB Output is correct
2 Correct 46 ms 20272 KB Output is correct
3 Correct 41 ms 19764 KB Output is correct
4 Correct 72 ms 20996 KB Output is correct
5 Correct 68 ms 20780 KB Output is correct
6 Execution timed out 1037 ms 20216 KB Time limit exceeded
7 Halted 0 ms 0 KB -