結果

問題 No.2442 線形写像
ユーザー tassei903tassei903
提出日時 2023-08-25 21:30:28
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 182 ms / 2,000 ms
コード長 556 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 88,092 KB
最終ジャッジ日時 2023-08-26 12:17:25
合計ジャッジ時間 3,348 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
71,348 KB
testcase_01 AC 68 ms
71,160 KB
testcase_02 AC 65 ms
71,120 KB
testcase_03 AC 66 ms
71,236 KB
testcase_04 AC 64 ms
71,552 KB
testcase_05 AC 64 ms
71,296 KB
testcase_06 AC 64 ms
71,560 KB
testcase_07 AC 64 ms
71,232 KB
testcase_08 AC 63 ms
71,264 KB
testcase_09 AC 68 ms
71,356 KB
testcase_10 AC 71 ms
76,624 KB
testcase_11 AC 72 ms
76,652 KB
testcase_12 AC 70 ms
76,584 KB
testcase_13 AC 69 ms
76,412 KB
testcase_14 AC 70 ms
76,536 KB
testcase_15 AC 95 ms
77,792 KB
testcase_16 AC 99 ms
77,912 KB
testcase_17 AC 182 ms
88,092 KB
testcase_18 AC 130 ms
78,412 KB
testcase_19 AC 129 ms
78,148 KB
testcase_20 AC 131 ms
78,176 KB
testcase_21 AC 179 ms
88,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = lambda :sys.stdin.readline()[:-1]
ni = lambda :int(input())
na = lambda :list(map(int,input().split()))
yes = lambda :print("yes");Yes = lambda :print("Yes");YES = lambda : print("YES")
no = lambda :print("no");No = lambda :print("No");NO = lambda : print("NO")
#######################################################################
n = ni()
a = [ni() for i in range(1<<n)]

ok = 1
for i in range(1<<n):
    x = 0
    for j in range(n):
        if i >> j & 1:
            x ^= a[1<<j]
    if x != a[i]:
        No()
        exit()
Yes()
0