結果

問題 No.2442 線形写像
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-08-25 22:37:14
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 324 bytes
コンパイル時間 378 ms
コンパイル使用メモリ 87,016 KB
実行使用メモリ 87,304 KB
最終ジャッジ日時 2023-08-25 22:37:24
合計ジャッジ時間 8,774 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
71,060 KB
testcase_01 AC 61 ms
71,368 KB
testcase_02 AC 62 ms
71,420 KB
testcase_03 AC 64 ms
71,260 KB
testcase_04 AC 73 ms
71,212 KB
testcase_05 AC 62 ms
71,372 KB
testcase_06 AC 62 ms
71,496 KB
testcase_07 AC 61 ms
71,356 KB
testcase_08 AC 64 ms
71,320 KB
testcase_09 AC 67 ms
75,816 KB
testcase_10 AC 75 ms
76,236 KB
testcase_11 AC 72 ms
76,420 KB
testcase_12 AC 71 ms
76,300 KB
testcase_13 AC 75 ms
76,416 KB
testcase_14 AC 180 ms
77,648 KB
testcase_15 AC 190 ms
77,928 KB
testcase_16 TLE -
testcase_17 AC 370 ms
78,224 KB
testcase_18 AC 357 ms
78,500 KB
testcase_19 AC 337 ms
78,192 KB
testcase_20 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
n2 = 1<<n
A = [int(input()) for i in range(n2)]

for b in range(n2):

    b1 = b
    if A[b] != A[b1]^A[b^b1]:
        print("No")
        exit()
    now = b & (b-1)
    while now > now^b:
        if A[b] != A[now]^A[now^b]:
            print("No")
            exit()
        now = (now-1) & b

print("Yes")
0