結果

問題 No.2155 みちらcolor
ユーザー wanuiwanui
提出日時 2022-12-09 21:57:50
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
AC  
実行時間 60 ms / 2,000 ms
コード長 485 bytes
コンパイル時間 426 ms
コンパイル使用メモリ 10,876 KB
実行使用メモリ 9,108 KB
最終ジャッジ日時 2023-08-04 23:37:29
合計ジャッジ時間 5,013 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
9,040 KB
testcase_01 AC 43 ms
9,088 KB
testcase_02 AC 36 ms
8,976 KB
testcase_03 AC 38 ms
8,972 KB
testcase_04 AC 38 ms
8,976 KB
testcase_05 AC 48 ms
9,040 KB
testcase_06 AC 28 ms
8,916 KB
testcase_07 AC 22 ms
8,892 KB
testcase_08 AC 43 ms
9,040 KB
testcase_09 AC 45 ms
8,968 KB
testcase_10 AC 32 ms
8,976 KB
testcase_11 AC 32 ms
9,096 KB
testcase_12 AC 42 ms
9,028 KB
testcase_13 AC 18 ms
9,016 KB
testcase_14 AC 49 ms
9,064 KB
testcase_15 AC 18 ms
8,960 KB
testcase_16 AC 31 ms
9,100 KB
testcase_17 AC 19 ms
8,904 KB
testcase_18 AC 42 ms
8,952 KB
testcase_19 AC 44 ms
8,920 KB
testcase_20 AC 55 ms
9,040 KB
testcase_21 AC 57 ms
9,044 KB
testcase_22 AC 49 ms
9,044 KB
testcase_23 AC 47 ms
8,984 KB
testcase_24 AC 56 ms
9,108 KB
testcase_25 AC 57 ms
8,968 KB
testcase_26 AC 54 ms
9,032 KB
testcase_27 AC 58 ms
9,100 KB
testcase_28 AC 50 ms
8,968 KB
testcase_29 AC 50 ms
9,040 KB
testcase_30 AC 51 ms
8,984 KB
testcase_31 AC 54 ms
8,968 KB
testcase_32 AC 53 ms
8,968 KB
testcase_33 AC 53 ms
9,048 KB
testcase_34 AC 55 ms
9,104 KB
testcase_35 AC 50 ms
8,956 KB
testcase_36 AC 52 ms
9,040 KB
testcase_37 AC 57 ms
9,036 KB
testcase_38 AC 50 ms
9,032 KB
testcase_39 AC 55 ms
8,972 KB
testcase_40 AC 60 ms
9,088 KB
testcase_41 AC 60 ms
9,096 KB
testcase_42 AC 19 ms
9,040 KB
testcase_43 AC 18 ms
8,952 KB
testcase_44 AC 18 ms
9,024 KB
testcase_45 AC 18 ms
8,904 KB
testcase_46 AC 18 ms
8,904 KB
testcase_47 AC 21 ms
9,088 KB
testcase_48 AC 20 ms
9,016 KB
testcase_49 AC 18 ms
8,956 KB
testcase_50 AC 21 ms
9,016 KB
testcase_51 AC 20 ms
9,064 KB
testcase_52 AC 20 ms
9,020 KB
testcase_53 AC 20 ms
9,072 KB
testcase_54 AC 19 ms
9,016 KB
testcase_55 AC 18 ms
9,040 KB
testcase_56 AC 21 ms
9,020 KB
testcase_57 AC 19 ms
9,024 KB
testcase_58 AC 18 ms
8,956 KB
testcase_59 AC 18 ms
9,084 KB
testcase_60 AC 18 ms
9,016 KB
testcase_61 AC 18 ms
9,008 KB
testcase_62 AC 20 ms
8,896 KB
testcase_63 AC 19 ms
9,052 KB
testcase_64 AC 19 ms
9,012 KB
testcase_65 AC 18 ms
9,020 KB
testcase_66 AC 19 ms
9,016 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,m,l=map(int,input().split())
a=list(map(int,input().split()))

memo=[None]*102
for i in range(102):
    row = list()
    row.append(-1)
    memo[i] = row*1002

def dp(i,x):
    if(memo[i][x]>=0):
        return memo[i][x]
    if i==n:
        if x==m:
            memo[i][x]=1
        else:
            memo[i][x]=0
        return memo[i][x]
    nx = (x+a[i])//2
    ans = dp(i+1,nx) + dp(i+1,x)
    memo[i][x]= min(ans,1)
    return memo[i][x]

print("Yes" if dp(0,l) > 0 else "No")
0