結果

問題 No.1238 選抜クラス
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2020-09-25 23:05:15
言語 PyPy3
(7.3.15)
結果
MLE  
実行時間 -
コード長 601 bytes
コンパイル時間 2,264 ms
コンパイル使用メモリ 86,904 KB
実行使用メモリ 837,456 KB
最終ジャッジ日時 2023-09-10 16:11:00
合計ジャッジ時間 6,205 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,156 KB
testcase_01 AC 76 ms
75,780 KB
testcase_02 AC 82 ms
76,216 KB
testcase_03 AC 74 ms
71,244 KB
testcase_04 AC 73 ms
70,992 KB
testcase_05 AC 71 ms
71,424 KB
testcase_06 AC 73 ms
71,356 KB
testcase_07 AC 81 ms
75,816 KB
testcase_08 AC 85 ms
76,180 KB
testcase_09 AC 84 ms
75,960 KB
testcase_10 AC 80 ms
75,952 KB
testcase_11 AC 86 ms
76,120 KB
testcase_12 AC 84 ms
75,980 KB
testcase_13 AC 83 ms
76,256 KB
testcase_14 AC 82 ms
75,980 KB
testcase_15 AC 84 ms
76,148 KB
testcase_16 AC 85 ms
76,128 KB
testcase_17 MLE -
testcase_18 -- -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

n,K = map(int,input().split())
a = list(map(int,input().split()))
dp = [[[0]*(100*n+1) for i in range(n+1)] for j in range(n+1)]
dp[0][0][0] = 1
mod = 10**9+7

for i in range(n):
    for j in range(i+1):
        x = a[i]
        for k in range(100*(i+1)+1):
            if dp[i][j][k] > 0:
                dp[i+1][j+1][k+x] += dp[i][j][k]
                dp[i+1][j+1][k+x] %= mod
            dp[i+1][j][k] += dp[i][j][k]
            dp[i+1][j][k] %= mod
ans = 0
for i in range(1,n+1):
    for j in range(100*n+1):
        if i*K <= j:
            ans += dp[-1][i][j]
            ans %= mod
print(ans)
0