結果

問題 No.2155 みちらcolor
ユーザー sepa38
提出日時 2022-12-09 21:27:54
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 2,000 ms
コード長 278 bytes
コンパイル時間 233 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 59,904 KB
最終ジャッジ日時 2024-10-14 20:07:15
合計ジャッジ時間 5,107 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 64
権限があれば一括ダウンロードができます

ソースコード

diff #

n, m, l = map(int, input().split())
a = list(map(int, input().split()))
lim = 1001
dp = [[0] * lim for i in range(n+1)]
dp[0][l] = 1
for i in range(n):
  for j in range(lim):
    if dp[i][j]:
      dp[i+1][(j+a[i])//2] = 1
      dp[i+1][j] = 1
print("Yes" if dp[n][m] else "No")
0