結果
問題 | No.115 遠足のおやつ |
ユーザー |
|
提出日時 | 2015-02-10 00:44:46 |
言語 | Python2 (2.7.18) |
結果 |
MLE
|
実行時間 | - |
コード長 | 393 bytes |
コンパイル時間 | 224 ms |
コンパイル使用メモリ | 7,072 KB |
実行使用メモリ | 682,020 KB |
最終ジャッジ日時 | 2024-06-23 16:53:44 |
合計ジャッジ時間 | 7,033 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 3 |
other | AC * 4 MLE * 1 -- * 35 |
ソースコード
N,D,K = map(int,raw_input().split())dp = [[] for _ in range(1001)]for i in range(1,N+1):for j in range(D+1-i)[::-1]:for comb in dp[j]:if len(comb) == K: continuedp[sum(comb)+i].append(comb+[i])dp[i].append([i])dp[D] = sorted(dp[D])for comb in dp[D]:if len(comb) == K:print " ".join(map(str,comb))breakelse:print -1