結果
| 問題 |
No.74 貯金箱の退屈
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-04-24 13:10:24 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 347 bytes |
| コンパイル時間 | 199 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 692,288 KB |
| 最終ジャッジ日時 | 2024-10-15 01:48:56 |
| 合計ジャッジ時間 | 7,346 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | MLE * 1 -- * 29 |
ソースコード
N = int(input())
D = tuple(map(lambda x: int(x) % N, input().split()))
W = int(input().replace(" ", ""), 2)
D_int = tuple(sum({pow(2, (i + x) % N), pow(2, (i - x) % N)}) for i, x in enumerate(D))
st = {W}
for d in D_int:
new_st = set()
for s in st:
new_st.add(s ^ d)
st |= new_st
print('Yes' if pow(2, N) - 1 in st else 'No')