結果

問題 No.2442 線形写像
ユーザー miya145592miya145592
提出日時 2023-08-25 22:47:02
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 400 bytes
コンパイル時間 279 ms
コンパイル使用メモリ 86,892 KB
実行使用メモリ 86,876 KB
最終ジャッジ日時 2023-08-25 22:47:07
合計ジャッジ時間 3,386 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,196 KB
testcase_01 AC 72 ms
71,064 KB
testcase_02 AC 64 ms
71,124 KB
testcase_03 AC 60 ms
71,152 KB
testcase_04 WA -
testcase_05 AC 60 ms
71,196 KB
testcase_06 WA -
testcase_07 AC 60 ms
71,268 KB
testcase_08 AC 63 ms
71,128 KB
testcase_09 WA -
testcase_10 AC 70 ms
75,448 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 70 ms
75,528 KB
testcase_14 AC 97 ms
77,636 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 140 ms
78,216 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = [int(input()) for _ in range(2**N)]
D = [[] for _ in range(N)]
for i in range(N):
    idx = (1<<i)
    for j in range(64):
        if (A[idx]>>j)&1:
            D[i].append(j)

for i in range(2**N):
    tmp = 0
    for j in range(64):
        if (i>>j)&1:
            for k in D[j]:
                tmp += (1<<k)
    if tmp!=A[i]:
        print("No")
        exit()

print("Yes")
0