結果

問題 No.1238 選抜クラス
ユーザー googol_S0googol_S0
提出日時 2020-09-25 21:28:01
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 301 bytes
コンパイル時間 293 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 76,120 KB
最終ジャッジ日時 2023-09-10 14:54:04
合計ジャッジ時間 5,082 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,140 KB
testcase_01 AC 73 ms
71,120 KB
testcase_02 AC 75 ms
75,688 KB
testcase_03 AC 71 ms
71,276 KB
testcase_04 AC 72 ms
71,256 KB
testcase_05 AC 70 ms
71,272 KB
testcase_06 AC 71 ms
71,016 KB
testcase_07 AC 77 ms
75,708 KB
testcase_08 AC 78 ms
75,888 KB
testcase_09 AC 83 ms
75,968 KB
testcase_10 AC 77 ms
75,708 KB
testcase_11 AC 82 ms
75,940 KB
testcase_12 AC 78 ms
75,840 KB
testcase_13 AC 78 ms
75,968 KB
testcase_14 AC 78 ms
75,912 KB
testcase_15 AC 79 ms
75,920 KB
testcase_16 AC 77 ms
75,792 KB
testcase_17 AC 97 ms
76,120 KB
testcase_18 AC 96 ms
75,960 KB
testcase_19 AC 96 ms
75,936 KB
testcase_20 AC 96 ms
75,760 KB
testcase_21 AC 96 ms
75,900 KB
testcase_22 AC 99 ms
76,048 KB
testcase_23 AC 99 ms
75,700 KB
testcase_24 AC 97 ms
75,856 KB
testcase_25 AC 97 ms
75,908 KB
testcase_26 AC 96 ms
75,940 KB
testcase_27 AC 99 ms
75,864 KB
testcase_28 AC 100 ms
76,020 KB
testcase_29 AC 100 ms
76,028 KB
testcase_30 AC 81 ms
75,940 KB
testcase_31 AC 86 ms
76,016 KB
testcase_32 AC 89 ms
75,676 KB
testcase_33 AC 76 ms
75,908 KB
testcase_34 AC 91 ms
75,920 KB
testcase_35 AC 80 ms
76,068 KB
testcase_36 AC 82 ms
75,904 KB
testcase_37 AC 82 ms
75,980 KB
testcase_38 AC 97 ms
75,888 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K=map(int,input().split())
A=list(map(int,input().split()))
DP=[[0]*(N*100+1) for i in range(N+1)]
DP[0][0]=1
mod=10**9+7
for i in range(N):
  for j in range((N-1)*100+1):
    DP[i+1][j+K]=(DP[i+1][j+K]+DP[i][j])%mod
    DP[i+1][j+A[i]]=(DP[i+1][j+A[i]]+DP[i][j])%mod
print((sum(DP[N][K*N:])-1)%mod)
0