Submission #793089

# Submission time Handle Problem Language Result Execution time Memory
793089 2023-07-25T13:47:46 Z poustouflan XORanges (eJOI19_xoranges) Python 3
38 / 100
947 ms 27536 KB
n, q = map(int, input().split())

A = list(map(int, input().split())) # scan results
doublepref = [0, 0]
for x in A:
    doublepref.append(doublepref[-2] ^ x)

for _ in range(q):
    q, i, j = map(int, input().split())
    if q == 1:
        # rescan
        A[i-1] = j
    else:
        # query
        if (j - i) % 2 == 1:
            print(0)
        else:
            print(doublepref[j+1] ^ doublepref[i-1])
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 2772 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 12 ms 2900 KB Output is correct
2 Correct 15 ms 2836 KB Output is correct
3 Correct 13 ms 2880 KB Output is correct
4 Correct 17 ms 2896 KB Output is correct
5 Correct 13 ms 2900 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 2772 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 929 ms 25296 KB Output is correct
2 Correct 947 ms 27536 KB Output is correct
3 Correct 926 ms 27532 KB Output is correct
4 Correct 899 ms 27508 KB Output is correct
5 Correct 942 ms 27468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 10 ms 2772 KB Output isn't correct
2 Halted 0 ms 0 KB -