Submission #14549048


Source Code Expand

Copy
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
A = np.array(read().split(), np.int64)

def main(A):
    N = len(A)
    if N % 2 == 0:
        S = np.bitwise_xor.reduce(A)
        return A ^ S
    return A

B = main(A)
print(' '.join(map(str, B.tolist())))

Submission Info

Submission Time
Task E - Red Scarf
User maspy
Language Python (3.8.2)
Score 500
Code Size 383 Byte
Status
Exec Time 200 ms
Memory 52540 KB

Judge Result

Set Name Score / Max Score Test Cases
All 500 / 500 sample_01.txt, testcase_1.txt, testcase_10.txt, testcase_11.txt, testcase_12.txt, testcase_13.txt, testcase_14.txt, testcase_15.txt, testcase_16.txt, testcase_17.txt, testcase_18.txt, testcase_19.txt, testcase_2.txt, testcase_3.txt, testcase_4.txt, testcase_5.txt, testcase_6.txt, testcase_7.txt, testcase_8.txt, testcase_9.txt
Sample 0 / 0 sample_01.txt
Case Name Status Exec Time Memory
sample_01.txt 121 ms 26928 KB
testcase_1.txt 114 ms 26740 KB
testcase_10.txt 158 ms 37116 KB
testcase_11.txt 130 ms 31148 KB
testcase_12.txt 117 ms 27244 KB
testcase_13.txt 178 ms 43552 KB
testcase_14.txt 143 ms 34776 KB
testcase_15.txt 169 ms 43424 KB
testcase_16.txt 139 ms 33596 KB
testcase_17.txt 154 ms 37776 KB
testcase_18.txt 190 ms 49432 KB
testcase_19.txt 148 ms 36740 KB
testcase_2.txt 200 ms 52540 KB
testcase_3.txt 175 ms 45980 KB
testcase_4.txt 168 ms 42304 KB
testcase_5.txt 198 ms 50436 KB
testcase_6.txt 165 ms 40896 KB
testcase_7.txt 171 ms 43432 KB
testcase_8.txt 166 ms 41680 KB
testcase_9.txt 199 ms 51928 KB