結果

問題 No.2442 線形写像
ユーザー ゼットゼット
提出日時 2023-08-25 21:33:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 177 ms / 2,000 ms
コード長 317 bytes
コンパイル時間 235 ms
コンパイル使用メモリ 87,032 KB
実行使用メモリ 86,836 KB
最終ジャッジ日時 2023-08-26 12:17:40
合計ジャッジ時間 3,404 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 65 ms
71,608 KB
testcase_01 AC 66 ms
71,160 KB
testcase_02 AC 69 ms
71,344 KB
testcase_03 AC 65 ms
71,416 KB
testcase_04 AC 64 ms
71,116 KB
testcase_05 AC 66 ms
71,308 KB
testcase_06 AC 64 ms
71,248 KB
testcase_07 AC 62 ms
71,300 KB
testcase_08 AC 65 ms
71,336 KB
testcase_09 AC 67 ms
71,564 KB
testcase_10 AC 72 ms
71,452 KB
testcase_11 AC 75 ms
75,632 KB
testcase_12 AC 77 ms
75,612 KB
testcase_13 AC 77 ms
75,624 KB
testcase_14 AC 75 ms
75,600 KB
testcase_15 AC 111 ms
80,200 KB
testcase_16 AC 114 ms
79,912 KB
testcase_17 AC 172 ms
86,836 KB
testcase_18 AC 147 ms
81,472 KB
testcase_19 AC 148 ms
81,584 KB
testcase_20 AC 146 ms
81,564 KB
testcase_21 AC 177 ms
86,572 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

A=[]
N=int(input())
w=0
T={}
for i in range(N):
  T[2**i]=i
for x in range(2**N):
  y=int(input())
  A.append(y)
  if x==0:
    if y!=0:
      print('No')
      exit()
  else:
    if x in T:
      w=x
    else:
      pos=x%w
      z=A[w]^A[pos]
      if z!=y:
        print('No')
        exit()
print('Yes')
      
  
0