結果

問題 No.2442 線形写像
ユーザー t98slidert98slider
提出日時 2023-06-10 10:50:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 626 ms / 2,000 ms
コード長 329 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 10,584 KB
実行使用メモリ 14,892 KB
最終ジャッジ日時 2023-08-26 12:16:27
合計ジャッジ時間 5,364 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
8,192 KB
testcase_01 AC 16 ms
7,904 KB
testcase_02 AC 16 ms
8,100 KB
testcase_03 AC 16 ms
8,048 KB
testcase_04 AC 16 ms
7,872 KB
testcase_05 AC 16 ms
7,800 KB
testcase_06 AC 16 ms
8,188 KB
testcase_07 AC 16 ms
7,900 KB
testcase_08 AC 17 ms
8,124 KB
testcase_09 AC 16 ms
8,256 KB
testcase_10 AC 16 ms
7,780 KB
testcase_11 AC 19 ms
8,140 KB
testcase_12 AC 19 ms
7,824 KB
testcase_13 AC 19 ms
7,792 KB
testcase_14 AC 19 ms
8,196 KB
testcase_15 AC 286 ms
10,644 KB
testcase_16 AC 287 ms
10,660 KB
testcase_17 AC 616 ms
12,260 KB
testcase_18 AC 621 ms
14,872 KB
testcase_19 AC 626 ms
14,892 KB
testcase_20 AC 610 ms
14,888 KB
testcase_21 AC 617 ms
12,260 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