結果

問題 No.1238 選抜クラス
ユーザー 👑 timitimi
提出日時 2020-09-27 22:34:03
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 385 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 10,944 KB
実行使用メモリ 36,336 KB
最終ジャッジ日時 2023-09-13 03:40:10
合計ジャッジ時間 17,977 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
8,888 KB
testcase_01 AC 44 ms
8,892 KB
testcase_02 AC 90 ms
9,980 KB
testcase_03 AC 15 ms
8,140 KB
testcase_04 AC 15 ms
8,196 KB
testcase_05 AC 14 ms
8,132 KB
testcase_06 AC 15 ms
8,196 KB
testcase_07 AC 65 ms
9,536 KB
testcase_08 AC 87 ms
9,908 KB
testcase_09 AC 132 ms
10,740 KB
testcase_10 AC 71 ms
9,620 KB
testcase_11 AC 122 ms
10,532 KB
testcase_12 AC 100 ms
9,924 KB
testcase_13 AC 102 ms
10,004 KB
testcase_14 AC 90 ms
9,764 KB
testcase_15 AC 132 ms
10,780 KB
testcase_16 AC 119 ms
10,584 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 847 ms
34,172 KB
testcase_20 WA -
testcase_21 AC 777 ms
30,512 KB
testcase_22 WA -
testcase_23 AC 825 ms
24,528 KB
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 AC 889 ms
36,336 KB
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 268 ms
13,348 KB
testcase_31 WA -
testcase_32 AC 662 ms
25,920 KB
testcase_33 AC 66 ms
9,420 KB
testcase_34 WA -
testcase_35 WA -
testcase_36 AC 160 ms
11,344 KB
testcase_37 WA -
testcase_38 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int, input().split())
A=list(map(int, input().split()))
if N==1:
    if A[0]<K:
        print(0)
        exit()
    else:
        print(1)
        exit()
for i in range(N):
    A[i]-=K 
#print(A)
dp=[[0 for i in range(20200)]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