結果

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

ソースコード

diff #

N, M, L = map(int, input().split())
A = list(map(int, input().split()))

dp = [[False]*(1001) for _ in range(N+1)]
dp[0][L] = True

for i in range(N):
    for j in range(1001):
        if dp[i][j]:
            dp[i+1][j] = True
            dp[i+1][(j+A[i])//2] = True

if dp[N][M]:
    print("Yes")
else:
    print("No")
0