結果

問題 No.1238 選抜クラス
ユーザー tanon710tanon710
提出日時 2020-09-25 23:58:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,096 ms / 2,000 ms
コード長 402 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 87,064 KB
実行使用メモリ 76,692 KB
最終ジャッジ日時 2023-09-10 17:15:52
合計ジャッジ時間 20,544 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
76,220 KB
testcase_01 AC 86 ms
76,220 KB
testcase_02 AC 91 ms
76,152 KB
testcase_03 AC 77 ms
76,124 KB
testcase_04 AC 75 ms
76,124 KB
testcase_05 AC 76 ms
76,128 KB
testcase_06 AC 77 ms
76,080 KB
testcase_07 AC 85 ms
76,140 KB
testcase_08 AC 91 ms
76,000 KB
testcase_09 AC 102 ms
76,284 KB
testcase_10 AC 86 ms
76,300 KB
testcase_11 AC 101 ms
76,220 KB
testcase_12 AC 93 ms
76,064 KB
testcase_13 AC 95 ms
76,100 KB
testcase_14 AC 91 ms
76,044 KB
testcase_15 AC 103 ms
76,276 KB
testcase_16 AC 101 ms
76,280 KB
testcase_17 AC 1,087 ms
76,540 KB
testcase_18 AC 1,026 ms
76,652 KB
testcase_19 AC 1,051 ms
76,692 KB
testcase_20 AC 995 ms
76,632 KB
testcase_21 AC 940 ms
76,568 KB
testcase_22 AC 1,023 ms
76,484 KB
testcase_23 AC 1,016 ms
76,524 KB
testcase_24 AC 1,076 ms
76,300 KB
testcase_25 AC 1,078 ms
76,596 KB
testcase_26 AC 1,083 ms
76,528 KB
testcase_27 AC 1,096 ms
76,536 KB
testcase_28 AC 1,090 ms
76,300 KB
testcase_29 AC 1,053 ms
76,472 KB
testcase_30 AC 177 ms
76,596 KB
testcase_31 AC 388 ms
76,636 KB
testcase_32 AC 679 ms
76,632 KB
testcase_33 AC 84 ms
76,264 KB
testcase_34 AC 809 ms
76,564 KB
testcase_35 AC 230 ms
76,636 KB
testcase_36 AC 118 ms
76,636 KB
testcase_37 AC 189 ms
76,564 KB
testcase_38 AC 991 ms
76,564 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

mod=10**9+7

n,k=map(int,input().split())
arr=list(map(int,input().split()))
dp=[[0]*10001 for _ in range(n+1)]
dp[0][0]=1
for val in arr:
    for i in range(n,0,-1):
        for j in range(10000,val-1,-1):
            dp[i][j]+=dp[i-1][j-val]
            dp[i][j]%=mod
ans=0
for i in range(1,n+1):
    for j in range(10001):
        if j>=i*k:
            ans+=dp[i][j]
            ans%=mod
print(ans)
0