結果

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

ソースコード

diff #

N,M,L=map(int,input().split())
Al=list(map(int,input().split()))
dp=set([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