結果
問題 | No.1238 選抜クラス |
ユーザー | roaris |
提出日時 | 2020-11-18 16:11:57 |
言語 | PyPy3 (7.3.15) |
結果 |
MLE
|
実行時間 | - |
コード長 | 548 bytes |
コンパイル時間 | 2,124 ms |
コンパイル使用メモリ | 87,048 KB |
実行使用メモリ | 838,276 KB |
最終ジャッジ日時 | 2023-09-30 15:04:06 |
合計ジャッジ時間 | 5,858 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge14 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 91 ms
76,756 KB |
testcase_01 | AC | 92 ms
76,756 KB |
testcase_02 | AC | 126 ms
84,912 KB |
testcase_03 | AC | 80 ms
76,312 KB |
testcase_04 | AC | 81 ms
76,012 KB |
testcase_05 | AC | 82 ms
76,012 KB |
testcase_06 | AC | 81 ms
76,032 KB |
testcase_07 | AC | 107 ms
76,888 KB |
testcase_08 | AC | 132 ms
85,048 KB |
testcase_09 | AC | 167 ms
93,456 KB |
testcase_10 | AC | 116 ms
82,196 KB |
testcase_11 | AC | 160 ms
92,760 KB |
testcase_12 | AC | 131 ms
86,528 KB |
testcase_13 | AC | 134 ms
86,524 KB |
testcase_14 | AC | 127 ms
84,540 KB |
testcase_15 | AC | 171 ms
93,368 KB |
testcase_16 | AC | 160 ms
92,920 KB |
testcase_17 | MLE | - |
testcase_18 | -- | - |
testcase_19 | -- | - |
testcase_20 | -- | - |
testcase_21 | -- | - |
testcase_22 | -- | - |
testcase_23 | -- | - |
testcase_24 | -- | - |
testcase_25 | -- | - |
testcase_26 | -- | - |
testcase_27 | -- | - |
testcase_28 | -- | - |
testcase_29 | -- | - |
testcase_30 | -- | - |
testcase_31 | -- | - |
testcase_32 | -- | - |
testcase_33 | -- | - |
testcase_34 | -- | - |
testcase_35 | -- | - |
testcase_36 | -- | - |
testcase_37 | -- | - |
testcase_38 | -- | - |
ソースコード
N, K = map(int, input().split()) A = list(map(int, input().split())) dp = [[[0]*10001 for _ in range(N+1)] for _ in range(N+1)] dp[0][0][0] = 1 MOD = 10**9+7 for i in range(N): for j in range(N+1): for k in range(10001): dp[i+1][j][k] = (dp[i+1][j][k]+dp[i][j][k])%MOD if j+1<=N and k+A[i]<=10000: dp[i+1][j+1][k+A[i]] = (dp[i+1][j+1][k+A[i]]+dp[i][j][k])%MOD tle = 0 for i in range(1, N+1): for j in range(10001): if j>=i*K: tle += dp[N][i][j] print(tle)