結果

問題 No.2155 みちらcolor
ユーザー qib
提出日時 2023-01-06 00:07:34
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 48 ms / 2,000 ms
コード長 254 bytes
コンパイル時間 202 ms
コンパイル使用メモリ 82,408 KB
実行使用メモリ 68,932 KB
最終ジャッジ日時 2024-11-29 16:30:45
合計ジャッジ時間 4,975 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 64
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, l = map(int, input().split())
a = list(map(int, input().split()))

dp = set()
dp.add(l)
for i in range(n):
  ndp = set()
  for x in dp:
    ndp.add(x)
    ndp.add((x + a[i]) // 2)

  if m in ndp:
    print("Yes")
    exit()

  dp = ndp

print("No")
0