結果

問題 No.1238 選抜クラス
ユーザー 👑 timitimi
提出日時 2020-09-27 22:25:33
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 287 bytes
コンパイル時間 634 ms
コンパイル使用メモリ 10,676 KB
実行使用メモリ 31,556 KB
最終ジャッジ日時 2023-09-13 03:29:06
合計ジャッジ時間 10,020 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
8,776 KB
testcase_01 AC 43 ms
8,824 KB
testcase_02 AC 92 ms
9,896 KB
testcase_03 AC 26 ms
8,500 KB
testcase_04 AC 26 ms
8,564 KB
testcase_05 RE -
testcase_06 AC 25 ms
8,568 KB
testcase_07 RE -
testcase_08 RE -
testcase_09 AC 130 ms
10,664 KB
testcase_10 AC 72 ms
9,616 KB
testcase_11 RE -
testcase_12 RE -
testcase_13 AC 98 ms
10,048 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 WA -
testcase_21 RE -
testcase_22 WA -
testcase_23 RE -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 AC 159 ms
11,188 KB
testcase_37 RE -
testcase_38 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int, input().split())
A=list(map(int, input().split()))
for i in range(N):
    A[i]-=K 
#print(A)
dp=[[0 for i in range(20010)]for i in range(N+1)]
dp[0][10000]=1
for i in range(N):
    for j in range(20001):
        dp[i+1][j]+=dp[i][j-A[i]]+dp[i][j]
print(sum(dp[N][10000:])-1)
0