結果
| 問題 | 
                            No.1238 選抜クラス
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-09-26 19:57:27 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                RE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 451 bytes | 
| コンパイル時間 | 209 ms | 
| コンパイル使用メモリ | 82,832 KB | 
| 実行使用メモリ | 85,836 KB | 
| 最終ジャッジ日時 | 2024-06-29 17:37:21 | 
| 合計ジャッジ時間 | 5,661 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 30 RE * 6 | 
ソースコード
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])