結果

問題 No.115 遠足のおやつ
ユーザー TawaraTawara
提出日時 2015-09-16 09:21:08
言語 Python2
(2.7.18)
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 309 bytes
コンパイル時間 142 ms
コンパイル使用メモリ 7,040 KB
実行使用メモリ 7,680 KB
最終ジャッジ日時 2024-05-01 19:10:41
合計ジャッジ時間 3,305 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 11 ms
6,812 KB
testcase_01 AC 14 ms
6,944 KB
testcase_02 AC 14 ms
6,944 KB
testcase_03 AC 12 ms
6,944 KB
testcase_04 AC 138 ms
6,944 KB
testcase_05 AC 11 ms
6,944 KB
testcase_06 AC 11 ms
6,940 KB
testcase_07 AC 13 ms
6,940 KB
testcase_08 AC 12 ms
6,940 KB
testcase_09 AC 11 ms
6,940 KB
testcase_10 AC 11 ms
6,944 KB
testcase_11 AC 11 ms
6,940 KB
testcase_12 AC 12 ms
6,940 KB
testcase_13 AC 12 ms
6,940 KB
testcase_14 AC 16 ms
6,940 KB
testcase_15 AC 80 ms
6,940 KB
testcase_16 AC 114 ms
6,944 KB
testcase_17 AC 38 ms
6,944 KB
testcase_18 AC 11 ms
6,940 KB
testcase_19 WA -
testcase_20 AC 15 ms
6,944 KB
testcase_21 AC 11 ms
6,944 KB
testcase_22 AC 52 ms
6,940 KB
testcase_23 AC 13 ms
6,940 KB
testcase_24 AC 47 ms
6,940 KB
testcase_25 AC 36 ms
6,944 KB
testcase_26 AC 19 ms
6,944 KB
testcase_27 AC 27 ms
6,940 KB
testcase_28 AC 21 ms
6,944 KB
testcase_29 AC 26 ms
6,940 KB
testcase_30 AC 48 ms
6,944 KB
testcase_31 AC 21 ms
6,940 KB
testcase_32 AC 90 ms
6,944 KB
testcase_33 AC 14 ms
6,940 KB
testcase_34 AC 132 ms
6,940 KB
testcase_35 AC 37 ms
6,944 KB
testcase_36 AC 41 ms
6,944 KB
testcase_37 AC 90 ms
6,944 KB
testcase_38 AC 252 ms
7,680 KB
testcase_39 AC 252 ms
7,680 KB
testcase_40 AC 11 ms
6,944 KB
testcase_41 AC 11 ms
6,940 KB
testcase_42 AC 11 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N,D,K = map(int,raw_input().split())
dp = {0:set()}
for i in xrange(K):
	tmp_dp = dict()
	for k,v in dp.iteritems():
		for j in xrange(1,N+1):
			if j in v:
				continue
			if k+j <= D:
				tmp_dp[k+j] = v|{j}
	dp = tmp_dp
print -1 if D not in dp or len(dp[D]) != K else " ".join(map(str,sorted(list(dp[D]))))
0