結果

問題 No.2442 線形写像
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-08-25 22:38:58
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 369 bytes
コンパイル時間 638 ms
コンパイル使用メモリ 87,112 KB
実行使用メモリ 88,368 KB
最終ジャッジ日時 2023-08-25 22:39:09
合計ジャッジ時間 8,937 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 63 ms
71,296 KB
testcase_01 AC 60 ms
71,652 KB
testcase_02 AC 71 ms
71,492 KB
testcase_03 AC 60 ms
71,388 KB
testcase_04 AC 59 ms
71,504 KB
testcase_05 AC 62 ms
71,316 KB
testcase_06 AC 59 ms
71,564 KB
testcase_07 AC 60 ms
71,120 KB
testcase_08 AC 62 ms
71,428 KB
testcase_09 AC 66 ms
75,824 KB
testcase_10 AC 63 ms
76,048 KB
testcase_11 AC 64 ms
76,172 KB
testcase_12 AC 65 ms
76,168 KB
testcase_13 AC 67 ms
76,260 KB
testcase_14 AC 130 ms
77,484 KB
testcase_15 AC 146 ms
77,348 KB
testcase_16 TLE -
testcase_17 AC 235 ms
77,856 KB
testcase_18 AC 242 ms
78,056 KB
testcase_19 AC 232 ms
77,948 KB
testcase_20 TLE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

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

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

print("Yes")
0