結果

問題 No.2155 みちらcolor
ユーザー wanuiwanui
提出日時 2022-12-09 21:57:50
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 80 ms / 2,000 ms
コード長 485 bytes
コンパイル時間 505 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 11,520 KB
最終ジャッジ日時 2024-04-22 22:04:04
合計ジャッジ時間 5,747 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
11,520 KB
testcase_01 AC 65 ms
11,392 KB
testcase_02 AC 53 ms
11,520 KB
testcase_03 AC 56 ms
11,520 KB
testcase_04 AC 57 ms
11,520 KB
testcase_05 AC 67 ms
11,520 KB
testcase_06 AC 45 ms
11,520 KB
testcase_07 AC 37 ms
11,392 KB
testcase_08 AC 64 ms
11,392 KB
testcase_09 AC 65 ms
11,392 KB
testcase_10 AC 50 ms
11,520 KB
testcase_11 AC 48 ms
11,520 KB
testcase_12 AC 61 ms
11,392 KB
testcase_13 AC 33 ms
11,520 KB
testcase_14 AC 67 ms
11,392 KB
testcase_15 AC 32 ms
11,392 KB
testcase_16 AC 48 ms
11,392 KB
testcase_17 AC 34 ms
11,392 KB
testcase_18 AC 60 ms
11,392 KB
testcase_19 AC 62 ms
11,392 KB
testcase_20 AC 74 ms
11,520 KB
testcase_21 AC 78 ms
11,392 KB
testcase_22 AC 67 ms
11,392 KB
testcase_23 AC 66 ms
11,520 KB
testcase_24 AC 77 ms
11,392 KB
testcase_25 AC 76 ms
11,392 KB
testcase_26 AC 76 ms
11,520 KB
testcase_27 AC 77 ms
11,392 KB
testcase_28 AC 69 ms
11,392 KB
testcase_29 AC 69 ms
11,392 KB
testcase_30 AC 71 ms
11,520 KB
testcase_31 AC 73 ms
11,392 KB
testcase_32 AC 74 ms
11,520 KB
testcase_33 AC 74 ms
11,392 KB
testcase_34 AC 76 ms
11,520 KB
testcase_35 AC 71 ms
11,392 KB
testcase_36 AC 72 ms
11,392 KB
testcase_37 AC 77 ms
11,392 KB
testcase_38 AC 69 ms
11,520 KB
testcase_39 AC 75 ms
11,392 KB
testcase_40 AC 79 ms
11,392 KB
testcase_41 AC 80 ms
11,520 KB
testcase_42 AC 33 ms
11,520 KB
testcase_43 AC 33 ms
11,520 KB
testcase_44 AC 32 ms
11,392 KB
testcase_45 AC 33 ms
11,520 KB
testcase_46 AC 32 ms
11,392 KB
testcase_47 AC 39 ms
11,520 KB
testcase_48 AC 35 ms
11,520 KB
testcase_49 AC 34 ms
11,392 KB
testcase_50 AC 34 ms
11,392 KB
testcase_51 AC 35 ms
11,520 KB
testcase_52 AC 34 ms
11,392 KB
testcase_53 AC 35 ms
11,392 KB
testcase_54 AC 34 ms
11,392 KB
testcase_55 AC 34 ms
11,392 KB
testcase_56 AC 34 ms
11,392 KB
testcase_57 AC 34 ms
11,392 KB
testcase_58 AC 32 ms
11,392 KB
testcase_59 AC 32 ms
11,520 KB
testcase_60 AC 32 ms
11,392 KB
testcase_61 AC 34 ms
11,520 KB
testcase_62 AC 34 ms
11,392 KB
testcase_63 AC 34 ms
11,520 KB
testcase_64 AC 33 ms
11,392 KB
testcase_65 AC 33 ms
11,392 KB
testcase_66 AC 32 ms
11,392 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