25532023-01-17 01:02:40kristofIntervallumXOR kihíváspython3Runtime error 0/100256ms27960 KiB
#spagetti
import sys
pow2 = [1 << i for i in range(30)][::-1]
x = [0 for i in range(200000)]
N = int(input())
for i in range(N):
    x[i] = int(input())
for i in range(N):
    if x[i] % 4 == 0:
        xor = x
    if x[i] % 4 == 1:
        xor = 1
    if x[i] % 4 == 2:
        xor = x + 1
    if x[i] % 4 == 3:
        xor = 0
    drop = xor
    for index in range(30):
        if pow2[index] ^ drop <= x[i]:
            drop ^= pow2[index]
    #print(xor, xor ^ drop)
    sys.stdout.write(str(xor) + " " + str(xor ^ drop) + "\n")
SubtaskSumTestVerdictTimeMemory
subtask10/0
1Runtime error29ms14680 KiB
subtask20/15
2Runtime error28ms14680 KiB
subtask30/15
3Runtime error256ms27960 KiB
subtask40/20
4Runtime error28ms15684 KiB
subtask50/50
5Runtime error252ms27860 KiB
6Runtime error252ms27656 KiB