結果

問題 No.1238 選抜クラス
ユーザー tikitaka1201tikitaka1201
提出日時 2020-09-26 19:57:27
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 451 bytes
コンパイル時間 666 ms
コンパイル使用メモリ 87,188 KB
実行使用メモリ 90,148 KB
最終ジャッジ日時 2023-09-12 04:34:43
合計ジャッジ時間 8,887 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
74,588 KB
testcase_01 AC 79 ms
74,888 KB
testcase_02 AC 82 ms
75,624 KB
testcase_03 AC 78 ms
74,828 KB
testcase_04 AC 80 ms
74,616 KB
testcase_05 AC 78 ms
74,900 KB
testcase_06 AC 76 ms
74,648 KB
testcase_07 AC 80 ms
75,796 KB
testcase_08 AC 79 ms
75,884 KB
testcase_09 AC 83 ms
75,856 KB
testcase_10 AC 81 ms
75,764 KB
testcase_11 AC 83 ms
75,932 KB
testcase_12 AC 81 ms
75,792 KB
testcase_13 AC 81 ms
75,864 KB
testcase_14 AC 81 ms
75,716 KB
testcase_15 AC 81 ms
75,820 KB
testcase_16 AC 81 ms
75,860 KB
testcase_17 RE -
testcase_18 AC 271 ms
84,320 KB
testcase_19 AC 271 ms
76,156 KB
testcase_20 AC 264 ms
84,328 KB
testcase_21 AC 237 ms
76,256 KB
testcase_22 AC 289 ms
84,596 KB
testcase_23 AC 280 ms
76,352 KB
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 280 ms
84,228 KB
testcase_30 AC 89 ms
76,272 KB
testcase_31 AC 117 ms
76,208 KB
testcase_32 AC 175 ms
76,248 KB
testcase_33 AC 82 ms
75,896 KB
testcase_34 AC 208 ms
76,124 KB
testcase_35 AC 95 ms
76,372 KB
testcase_36 AC 85 ms
75,796 KB
testcase_37 AC 91 ms
76,208 KB
testcase_38 AC 260 ms
84,196 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n,k=map(int, input().split())
*a,=map(int, input().split())
mod=10**9+7

dp=[[0]*(100*100+1) for _ in range(n+1)]
# dp[ここまで選んだ人数][点数]
dp[0][0]=1

for i in range(n):
    for j in range(i+1, 0,-1):
        for score in range(j*100+1):
            dp[j][score+a[i]]+=dp[j-1][score]
            dp[j][score+a[i]]%=mod
            

ans=0
for i in range(n):
    ans+=sum(dp[i+1][k*(i+1):])
    ans%=mod
print(ans)
#print(dp[1][:101])
0