結果
問題 | No.1238 選抜クラス |
ユーザー | komkompi |
提出日時 | 2020-10-17 22:11:40 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 356 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 10,772 KB |
実行使用メモリ | 9,408 KB |
最終ジャッジ日時 | 2023-09-28 08:41:34 |
合計ジャッジ時間 | 9,013 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 32 ms
8,424 KB |
testcase_01 | AC | 52 ms
8,552 KB |
testcase_02 | AC | 307 ms
8,876 KB |
testcase_03 | AC | 19 ms
8,372 KB |
testcase_04 | AC | 20 ms
8,340 KB |
testcase_05 | AC | 20 ms
8,296 KB |
testcase_06 | AC | 20 ms
8,328 KB |
testcase_07 | AC | 145 ms
8,760 KB |
testcase_08 | AC | 298 ms
9,096 KB |
testcase_09 | AC | 694 ms
9,408 KB |
testcase_10 | AC | 195 ms
8,788 KB |
testcase_11 | AC | 586 ms
9,316 KB |
testcase_12 | AC | 361 ms
9,016 KB |
testcase_13 | AC | 355 ms
9,204 KB |
testcase_14 | AC | 291 ms
9,004 KB |
testcase_15 | AC | 680 ms
9,360 KB |
testcase_16 | AC | 605 ms
9,264 KB |
testcase_17 | TLE | - |
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 | -- | - |
ソースコード
# 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)