結果

問題 No.2155 みちらcolor
ユーザー tomoyawa
提出日時 2023-01-02 19:28:05
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 272 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 82,156 KB
実行使用メモリ 70,484 KB
最終ジャッジ日時 2024-11-27 01:13:49
合計ジャッジ時間 4,770 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 61 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,L=map(int,input().split())
Al=list(map(int,input().split()))
dp=set([0,L])
for i in range(N):
    next_dp=set()
    for a in dp:
        next_dp.add(a)
        c=(a+Al[i])//2
        if c<=M:
            next_dp.add(c)
    dp=next_dp
print("Yes" if M in dp else "No")
0