25532023-01-17 01:02:40kristofIntervallumXOR kihíváspython3Futási hiba 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")
RészfeladatÖsszpontTesztVerdiktIdőMemória
subtask10/0
1Futási hiba29ms14680 KiB
subtask20/15
2Futási hiba28ms14680 KiB
subtask30/15
3Futási hiba256ms27960 KiB
subtask40/20
4Futási hiba28ms15684 KiB
subtask50/50
5Futási hiba252ms27860 KiB
6Futási hiba252ms27656 KiB