Submission #437382

# Submission time Handle Problem Language Result Execution time Memory
437382 2021-06-26T08:58:47 Z MinhQNgo XORanges (eJOI19_xoranges) PyPy 3
12 / 100
1000 ms 36924 KB
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, y - x + 2):
            cur_xor = 0
            for i in range(x, y - l + 2):
                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 Correct 84 ms 19332 KB Output is correct
2 Correct 79 ms 19928 KB Output is correct
3 Correct 97 ms 19588 KB Output is correct
4 Correct 171 ms 20800 KB Output is correct
5 Correct 187 ms 20856 KB Output is correct
# Verdict Execution time Memory Grader output
1 Execution timed out 1086 ms 19920 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 84 ms 19332 KB Output is correct
2 Correct 79 ms 19928 KB Output is correct
3 Correct 97 ms 19588 KB Output is correct
4 Correct 171 ms 20800 KB Output is correct
5 Correct 187 ms 20856 KB Output is correct
6 Execution timed out 1086 ms 19920 KB Time limit exceeded
7 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Execution timed out 1077 ms 36924 KB Time limit exceeded
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 84 ms 19332 KB Output is correct
2 Correct 79 ms 19928 KB Output is correct
3 Correct 97 ms 19588 KB Output is correct
4 Correct 171 ms 20800 KB Output is correct
5 Correct 187 ms 20856 KB Output is correct
6 Execution timed out 1086 ms 19920 KB Time limit exceeded
7 Halted 0 ms 0 KB -