結果
問題 | No.2155 みちらcolor |
ユーザー |
![]() |
提出日時 | 2022-12-09 22:03:42 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 83 ms / 2,000 ms |
コード長 | 430 bytes |
コンパイル時間 | 321 ms |
コンパイル使用メモリ | 82,264 KB |
実行使用メモリ | 76,416 KB |
最終ジャッジ日時 | 2024-10-14 22:01:03 |
合計ジャッジ時間 | 6,934 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 64 |
ソースコード
N,M,L=map(int, input().split()) A=list(map(int, input().split())) D={} D[L]=1 from collections import deque d=deque() d.append(L) for i in range(N): nd=deque() DD={} while d: now=d.popleft() nex=(now+A[i])//2 if nex not in D: D[nex]=1 if nex not in DD: DD[nex]=1 nd.append(nex) if now not in DD: DD[now]=1 nd.append(now) d=nd if M in D: print('Yes') else: print('No')