結果
| 問題 | No.1238 選抜クラス |
| コンテスト | |
| ユーザー |
komkompi
|
| 提出日時 | 2020-10-17 22:11:40 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| 記録 | |
| コンパイル時間 | 540 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 23,680 KB |
| 最終ジャッジ日時 | 2024-07-21 03:11:35 |
| 合計ジャッジ時間 | 9,383 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 TLE * 1 -- * 21 |
ソースコード
# 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)
komkompi