結果

問題 No.2442 線形写像
ユーザー miya145592miya145592
提出日時 2023-08-25 22:50:05
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 256 ms / 2,000 ms
コード長 307 bytes
コンパイル時間 287 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 87,212 KB
最終ジャッジ日時 2023-08-26 12:18:36
合計ジャッジ時間 4,084 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
71,596 KB
testcase_01 AC 74 ms
71,384 KB
testcase_02 AC 74 ms
71,384 KB
testcase_03 AC 73 ms
71,496 KB
testcase_04 AC 74 ms
71,380 KB
testcase_05 AC 75 ms
71,468 KB
testcase_06 AC 75 ms
71,200 KB
testcase_07 AC 77 ms
75,948 KB
testcase_08 AC 77 ms
75,920 KB
testcase_09 AC 79 ms
75,748 KB
testcase_10 AC 82 ms
76,488 KB
testcase_11 AC 90 ms
76,772 KB
testcase_12 AC 91 ms
76,872 KB
testcase_13 AC 88 ms
76,588 KB
testcase_14 AC 90 ms
76,620 KB
testcase_15 AC 134 ms
77,924 KB
testcase_16 AC 136 ms
78,024 KB
testcase_17 AC 256 ms
87,104 KB
testcase_18 AC 191 ms
78,328 KB
testcase_19 AC 194 ms
78,360 KB
testcase_20 AC 194 ms
78,536 KB
testcase_21 AC 256 ms
87,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(input()) for _ in range(2**N)]
D = [0 for _ in range(N)]
for i in range(N):
    idx = (1<<i)
    D[i] = A[idx]

for i in range(2**N):
    tmp = 0
    for j in range(64):
        if (i>>j)&1:
            tmp ^= D[j]
    if tmp!=A[i]:
        print("No")
        exit()

print("Yes")
0