답안 #850020

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
850020 2023-09-15T15:59:49 Z MinhQNgo XORanges (eJOI19_xoranges) PyPy 3
55 / 100
1000 ms 39140 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:
        d = y - x + 1
        total_xor_of_seq_len_d = 0
        for i in range(1, d + 1):
            cnt_in_seqs = i * (d - i + 1)
            if cnt_in_seqs % 2 == 0:
                continue
            else:
                total_xor_of_seq_len_d ^= a[i + (x - 2)]
        print(total_xor_of_seq_len_d)
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 18992 KB Output is correct
2 Correct 33 ms 18836 KB Output is correct
3 Correct 31 ms 18744 KB Output is correct
4 Correct 44 ms 19188 KB Output is correct
5 Correct 37 ms 18880 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 50 ms 21040 KB Output is correct
2 Correct 56 ms 20756 KB Output is correct
3 Correct 53 ms 20756 KB Output is correct
4 Correct 66 ms 20772 KB Output is correct
5 Correct 49 ms 20680 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 18992 KB Output is correct
2 Correct 33 ms 18836 KB Output is correct
3 Correct 31 ms 18744 KB Output is correct
4 Correct 44 ms 19188 KB Output is correct
5 Correct 37 ms 18880 KB Output is correct
6 Correct 50 ms 21040 KB Output is correct
7 Correct 56 ms 20756 KB Output is correct
8 Correct 53 ms 20756 KB Output is correct
9 Correct 66 ms 20772 KB Output is correct
10 Correct 49 ms 20680 KB Output is correct
11 Correct 108 ms 26136 KB Output is correct
12 Correct 128 ms 26672 KB Output is correct
13 Correct 166 ms 24180 KB Output is correct
14 Correct 156 ms 24088 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 1056 ms 39140 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 32 ms 18992 KB Output is correct
2 Correct 33 ms 18836 KB Output is correct
3 Correct 31 ms 18744 KB Output is correct
4 Correct 44 ms 19188 KB Output is correct
5 Correct 37 ms 18880 KB Output is correct
6 Correct 50 ms 21040 KB Output is correct
7 Correct 56 ms 20756 KB Output is correct
8 Correct 53 ms 20756 KB Output is correct
9 Correct 66 ms 20772 KB Output is correct
10 Correct 49 ms 20680 KB Output is correct
11 Correct 108 ms 26136 KB Output is correct
12 Correct 128 ms 26672 KB Output is correct
13 Correct 166 ms 24180 KB Output is correct
14 Correct 156 ms 24088 KB Output is correct
15 Execution timed out 1056 ms 39140 KB Time limit exceeded
16 Halted 0 ms 0 KB -