| Task: | Xor sum |
| Sender: | luukwin |
| Submission time: | 2025-09-22 17:00:36 +0300 |
| Language: | Python3 (PyPy3) |
| Status: | READY |
| Result: | WRONG ANSWER |
| test | verdict | time | |
|---|---|---|---|
| #1 | WRONG ANSWER | 0.04 s | details |
| #2 | WRONG ANSWER | 0.36 s | details |
Code
n, q = [int(x) for x in input().split()]
array = [int(x) for x in input().split()]
for i in range(1, n):
# print('Something', array[i], array[i-1], array[i] ^ array[i-1])
array[i] = array[i] ^ array[i-1]
print(array)
output = []
for i in range(q):
a, b = [int(x) for x in input().split()]
if a == 1: output.append(str(array[b-1]))
else: output.append(str(array[b-1] ^ array[a-2]))
print("\n".join(output))
Test details
Test 1
Verdict: WRONG ANSWER
| input |
|---|
| 8 36 7 6 4 6 2 9 4 8 1 1 1 2 1 3 ... |
| correct output |
|---|
| 7 1 5 3 1 ... |
| user output |
|---|
| [7, 1, 5, 3, 1, 8, 12, 4] 7 1 5 3 ... Truncated |
Test 2
Verdict: WRONG ANSWER
| input |
|---|
| 200000 200000 921726510 307633388 992247073 ... |
| correct output |
|---|
| 834756431 130379787 403037296 308618218 784778243 ... |
| user output |
|---|
| [921726510, 614888130, 5286174... Truncated |
