結果

問題 No.1238 選抜クラス
ユーザー komkompikomkompi
提出日時 2020-10-17 22:13:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 1,123 ms / 2,000 ms
コード長 366 bytes
コンパイル時間 413 ms
コンパイル使用メモリ 87,268 KB
実行使用メモリ 189,608 KB
最終ジャッジ日時 2023-09-28 08:42:19
合計ジャッジ時間 19,754 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
75,864 KB
testcase_01 AC 79 ms
76,084 KB
testcase_02 AC 89 ms
76,116 KB
testcase_03 AC 76 ms
76,008 KB
testcase_04 AC 75 ms
75,820 KB
testcase_05 AC 73 ms
75,772 KB
testcase_06 AC 75 ms
75,820 KB
testcase_07 AC 83 ms
76,180 KB
testcase_08 AC 89 ms
76,064 KB
testcase_09 AC 94 ms
76,116 KB
testcase_10 AC 86 ms
76,164 KB
testcase_11 AC 93 ms
76,260 KB
testcase_12 AC 89 ms
76,240 KB
testcase_13 AC 88 ms
76,044 KB
testcase_14 AC 85 ms
76,144 KB
testcase_15 AC 92 ms
76,224 KB
testcase_16 AC 93 ms
76,240 KB
testcase_17 AC 1,123 ms
189,528 KB
testcase_18 AC 1,015 ms
163,168 KB
testcase_19 AC 1,046 ms
177,248 KB
testcase_20 AC 941 ms
149,884 KB
testcase_21 AC 839 ms
125,892 KB
testcase_22 AC 983 ms
169,092 KB
testcase_23 AC 966 ms
158,936 KB
testcase_24 AC 1,081 ms
168,804 KB
testcase_25 AC 1,064 ms
158,420 KB
testcase_26 AC 1,050 ms
189,608 KB
testcase_27 AC 1,096 ms
189,308 KB
testcase_28 AC 1,101 ms
188,608 KB
testcase_29 AC 1,034 ms
174,768 KB
testcase_30 AC 146 ms
76,708 KB
testcase_31 AC 294 ms
76,232 KB
testcase_32 AC 526 ms
83,808 KB
testcase_33 AC 83 ms
76,060 KB
testcase_34 AC 642 ms
104,476 KB
testcase_35 AC 185 ms
76,600 KB
testcase_36 AC 107 ms
76,612 KB
testcase_37 AC 155 ms
76,724 KB
testcase_38 AC 935 ms
148,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# coding: utf-8
# Your code here!
N,K=map(int,input().split())
A=list(map(int,input().split()))

ans=0
dp=[[0]*10001 for i in range(N+1)]
dp[0][0]=1

for a in A:
    for n in range(N)[::-1]:
        for i in range(10001)[::-1]:
            if a+i<=10000:
                dp[n+1][a+i]+=dp[n][i]

for n in range(1,N+1):
    ans+=sum(dp[n][n*K:])

print(ans%(10**9+7))
0