結果

問題 No.2442 線形写像
ユーザー t98slidert98slider
提出日時 2023-06-10 10:49:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 180 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 1,166 ms
コンパイル使用メモリ 86,884 KB
実行使用メモリ 84,484 KB
最終ジャッジ日時 2023-08-26 12:16:27
合計ジャッジ時間 3,254 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,404 KB
testcase_01 AC 65 ms
71,232 KB
testcase_02 AC 69 ms
71,372 KB
testcase_03 AC 64 ms
71,560 KB
testcase_04 AC 65 ms
71,420 KB
testcase_05 AC 65 ms
71,320 KB
testcase_06 AC 62 ms
71,332 KB
testcase_07 AC 64 ms
71,404 KB
testcase_08 AC 64 ms
71,348 KB
testcase_09 AC 64 ms
71,524 KB
testcase_10 AC 70 ms
76,784 KB
testcase_11 AC 69 ms
76,780 KB
testcase_12 AC 72 ms
76,840 KB
testcase_13 AC 76 ms
76,668 KB
testcase_14 AC 72 ms
76,932 KB
testcase_15 AC 102 ms
77,776 KB
testcase_16 AC 99 ms
77,788 KB
testcase_17 AC 173 ms
84,484 KB
testcase_18 AC 126 ms
78,376 KB
testcase_19 AC 126 ms
78,140 KB
testcase_20 AC 125 ms
78,152 KB
testcase_21 AC 180 ms
84,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from sys import stdin

N = int(stdin.readline())
A = [0] * (1 << N)
A[0] = int(stdin.readline())

if A[0]:
    print('No')
    exit()

for S in range(1, 1 << N):
    A[S] = int(stdin.readline())
    T = A[S]
    for j in range(N):
    	if S >> j & 1:
    		T ^= A[1 << j]
    
    if T:
    	print('No')
    	exit()

print('Yes')
0