結果

問題 No.2442 線形写像
ユーザー titiatitia
提出日時 2023-08-25 22:01:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 969 ms / 2,000 ms
コード長 306 bytes
コンパイル時間 238 ms
コンパイル使用メモリ 87,036 KB
実行使用メモリ 89,212 KB
最終ジャッジ日時 2023-08-26 12:18:19
合計ジャッジ時間 8,425 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
72,044 KB
testcase_01 AC 413 ms
78,436 KB
testcase_02 AC 77 ms
72,116 KB
testcase_03 AC 80 ms
72,508 KB
testcase_04 AC 407 ms
78,340 KB
testcase_05 AC 413 ms
78,312 KB
testcase_06 AC 77 ms
72,320 KB
testcase_07 AC 407 ms
78,664 KB
testcase_08 AC 78 ms
72,100 KB
testcase_09 AC 80 ms
72,132 KB
testcase_10 AC 410 ms
78,720 KB
testcase_11 AC 83 ms
72,136 KB
testcase_12 AC 418 ms
78,252 KB
testcase_13 AC 418 ms
78,152 KB
testcase_14 AC 80 ms
72,240 KB
testcase_15 AC 136 ms
78,872 KB
testcase_16 AC 467 ms
79,060 KB
testcase_17 AC 867 ms
89,212 KB
testcase_18 AC 154 ms
79,560 KB
testcase_19 AC 474 ms
79,348 KB
testcase_20 AC 512 ms
79,480 KB
testcase_21 AC 969 ms
88,764 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

from random import randint

N=int(input())
A=[int(input()) for i in range(2**N)]

if A[0]!=0:
    print("No")
    exit()

for i in range(2*10**6):
    x,y=randint(0,2**N-1),randint(0,2**N-1)

    if A[x^y]!=A[x]^A[y]:
        print("No")
        exit()

print("Yes")
0