結果

問題 No.2442 線形写像
ユーザー mattu34mattu34
提出日時 2023-09-04 23:39:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 273 ms / 2,000 ms
コード長 324 bytes
コンパイル時間 749 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 88,708 KB
最終ジャッジ日時 2023-09-04 23:39:14
合計ジャッジ時間 5,604 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 94 ms
71,456 KB
testcase_01 AC 93 ms
71,956 KB
testcase_02 AC 94 ms
71,568 KB
testcase_03 AC 94 ms
71,460 KB
testcase_04 AC 92 ms
71,940 KB
testcase_05 AC 95 ms
71,548 KB
testcase_06 AC 96 ms
71,440 KB
testcase_07 AC 95 ms
71,844 KB
testcase_08 AC 97 ms
77,272 KB
testcase_09 AC 106 ms
77,024 KB
testcase_10 AC 102 ms
76,860 KB
testcase_11 AC 114 ms
77,572 KB
testcase_12 AC 112 ms
77,456 KB
testcase_13 AC 112 ms
77,672 KB
testcase_14 AC 116 ms
77,456 KB
testcase_15 AC 155 ms
78,416 KB
testcase_16 AC 157 ms
78,648 KB
testcase_17 AC 273 ms
88,708 KB
testcase_18 AC 206 ms
79,120 KB
testcase_19 AC 205 ms
79,120 KB
testcase_20 AC 202 ms
78,932 KB
testcase_21 AC 266 ms
88,600 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import *
import heapq

N = int(input())
A = [int(input()) for _ in range(2**N)]
if A[0] != 0:
    print("No")
    exit()
for i in range(1 << N):
    now = 0
    for j in range(17):
        if (i >> j) & 1 == 1:
            now ^= A[1 << j]
    if now != A[i]:
        print("No")
        exit()
print("Yes")
0