結果

問題 No.2442 線形写像
ユーザー rlangevinrlangevin
提出日時 2023-08-27 14:57:32
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 207 ms / 2,000 ms
コード長 284 bytes
コンパイル時間 1,051 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 84,260 KB
最終ジャッジ日時 2023-08-27 14:57:37
合計ジャッジ時間 5,273 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,048 KB
testcase_01 AC 72 ms
71,100 KB
testcase_02 AC 73 ms
71,016 KB
testcase_03 AC 74 ms
71,168 KB
testcase_04 AC 74 ms
71,316 KB
testcase_05 AC 77 ms
71,020 KB
testcase_06 AC 74 ms
71,220 KB
testcase_07 AC 75 ms
71,148 KB
testcase_08 AC 73 ms
71,196 KB
testcase_09 AC 73 ms
70,976 KB
testcase_10 AC 109 ms
76,384 KB
testcase_11 AC 80 ms
76,664 KB
testcase_12 AC 81 ms
76,792 KB
testcase_13 AC 79 ms
76,680 KB
testcase_14 AC 81 ms
76,656 KB
testcase_15 AC 115 ms
77,516 KB
testcase_16 AC 111 ms
77,704 KB
testcase_17 AC 205 ms
84,260 KB
testcase_18 AC 141 ms
78,128 KB
testcase_19 AC 149 ms
78,032 KB
testcase_20 AC 141 ms
78,328 KB
testcase_21 AC 207 ms
84,204 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
N2 = 1 << N
A = [0] * N2
for i in range(N2):
    A[i] = int(input())
    v = 0
    for j in range(N):
        if (i >> j) & 1:
            v ^= A[1 << j]
    if A[i] != v:
        print("No")
        exit()
        
print("Yes")
0