結果

問題 No.2442 線形写像
ユーザー t98slidert98slider
提出日時 2023-06-10 10:49:30
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
実行時間 -
コード長 339 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 10,684 KB
実行使用メモリ 13,928 KB
最終ジャッジ日時 2023-08-30 20:26:06
合計ジャッジ時間 4,620 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
12,492 KB
testcase_01 AC 16 ms
7,860 KB
testcase_02 AC 14 ms
8,264 KB
testcase_03 AC 15 ms
8,160 KB
testcase_04 AC 15 ms
7,852 KB
testcase_05 AC 15 ms
7,844 KB
testcase_06 AC 15 ms
8,128 KB
testcase_07 AC 15 ms
7,844 KB
testcase_08 AC 16 ms
8,288 KB
testcase_09 AC 15 ms
8,116 KB
testcase_10 AC 18 ms
7,852 KB
testcase_11 AC 39 ms
8,132 KB
testcase_12 AC 40 ms
7,816 KB
testcase_13 AC 40 ms
7,920 KB
testcase_14 AC 37 ms
8,320 KB
testcase_15 TLE -
testcase_16 -- -
testcase_17 -- -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
権限があれば一括ダウンロードができます

ソースコード

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 = S
    while T:
        if A[S] ^ A[T] ^ A[S ^ T]:
            print('No')
            exit()
        T -= 1
        T &= S

print('Yes')
0