結果

問題 No.2155 みちらcolor
ユーザー karankaranrankarankaranran
提出日時 2022-12-10 01:07:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 248 ms
コンパイル使用メモリ 82,564 KB
実行使用メモリ 61,812 KB
最終ジャッジ日時 2024-04-22 23:33:41
合計ジャッジ時間 4,165 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
59,668 KB
testcase_01 AC 37 ms
59,816 KB
testcase_02 AC 39 ms
59,444 KB
testcase_03 AC 38 ms
60,172 KB
testcase_04 AC 37 ms
60,248 KB
testcase_05 AC 38 ms
60,004 KB
testcase_06 AC 37 ms
58,648 KB
testcase_07 AC 36 ms
59,300 KB
testcase_08 AC 37 ms
59,356 KB
testcase_09 AC 39 ms
59,496 KB
testcase_10 AC 42 ms
60,368 KB
testcase_11 AC 38 ms
58,828 KB
testcase_12 AC 39 ms
59,820 KB
testcase_13 AC 37 ms
58,816 KB
testcase_14 AC 38 ms
59,876 KB
testcase_15 AC 38 ms
58,704 KB
testcase_16 AC 38 ms
59,632 KB
testcase_17 AC 37 ms
58,540 KB
testcase_18 AC 38 ms
60,340 KB
testcase_19 AC 36 ms
58,976 KB
testcase_20 AC 37 ms
59,696 KB
testcase_21 AC 37 ms
59,672 KB
testcase_22 AC 38 ms
60,980 KB
testcase_23 AC 38 ms
59,932 KB
testcase_24 AC 38 ms
60,344 KB
testcase_25 AC 37 ms
60,076 KB
testcase_26 AC 37 ms
59,684 KB
testcase_27 AC 37 ms
60,132 KB
testcase_28 AC 38 ms
59,744 KB
testcase_29 AC 38 ms
59,892 KB
testcase_30 AC 39 ms
60,856 KB
testcase_31 AC 38 ms
59,944 KB
testcase_32 AC 36 ms
58,972 KB
testcase_33 AC 39 ms
59,564 KB
testcase_34 AC 37 ms
59,956 KB
testcase_35 AC 39 ms
59,568 KB
testcase_36 AC 39 ms
60,220 KB
testcase_37 AC 39 ms
59,484 KB
testcase_38 AC 39 ms
61,052 KB
testcase_39 AC 38 ms
60,804 KB
testcase_40 AC 38 ms
61,704 KB
testcase_41 AC 39 ms
61,812 KB
testcase_42 AC 38 ms
60,356 KB
testcase_43 AC 36 ms
58,164 KB
testcase_44 AC 36 ms
58,524 KB
testcase_45 AC 35 ms
57,664 KB
testcase_46 AC 33 ms
52,440 KB
testcase_47 AC 38 ms
59,048 KB
testcase_48 AC 37 ms
59,572 KB
testcase_49 AC 36 ms
58,444 KB
testcase_50 AC 37 ms
60,296 KB
testcase_51 AC 37 ms
58,840 KB
testcase_52 AC 37 ms
58,700 KB
testcase_53 AC 36 ms
59,248 KB
testcase_54 AC 36 ms
59,364 KB
testcase_55 AC 39 ms
58,660 KB
testcase_56 AC 37 ms
59,504 KB
testcase_57 AC 37 ms
60,076 KB
testcase_58 AC 37 ms
59,800 KB
testcase_59 AC 35 ms
58,368 KB
testcase_60 AC 36 ms
58,792 KB
testcase_61 AC 36 ms
59,928 KB
testcase_62 AC 38 ms
60,396 KB
testcase_63 AC 37 ms
58,820 KB
testcase_64 AC 36 ms
59,188 KB
testcase_65 AC 34 ms
58,296 KB
testcase_66 AC 37 ms
59,108 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,M,L = map(int,input().split())
A = list(map(int,input().split()))
def color(a,b):
    return (a+b)//2

dp=[[0]*1001 for _ in range(N+1)]
dp[0][L]=1
for i in range(N):
    for j in range(1001):
        if dp[i][j]==1:
            dp[i+1][(j+A[i])//2]=1
            dp[i+1][j]=1
print('Yes' if dp[N][M] else 'No')
0