結果

問題 No.115 遠足のおやつ
ユーザー roiti46roiti46
提出日時 2015-02-10 00:51:39
言語 PyPy2
(7.3.15)
結果
RE  
実行時間 -
コード長 350 bytes
コンパイル時間 455 ms
コンパイル使用メモリ 77,568 KB
実行使用メモリ 126,556 KB
最終ジャッジ日時 2023-09-05 21:33:39
合計ジャッジ時間 14,312 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 RE -
testcase_02 AC 106 ms
79,092 KB
testcase_03 RE -
testcase_04 AC 4,424 ms
126,556 KB
testcase_05 AC 74 ms
76,524 KB
testcase_06 RE -
testcase_07 AC 75 ms
76,436 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 134 ms
79,968 KB
testcase_15 AC 1,769 ms
94,132 KB
testcase_16 AC 536 ms
84,248 KB
testcase_17 AC 84 ms
78,952 KB
testcase_18 RE -
testcase_19 AC 74 ms
76,156 KB
testcase_20 AC 72 ms
76,236 KB
testcase_21 AC 88 ms
78,764 KB
testcase_22 TLE -
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 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10000)

def dfs(array,i,d,k):
    if d == D and k == K: return array
    if i > N or d > D or d+i > D or k > K: return False
    res = dfs(array+[i],i+1,d+i,k+1)
    if res: return res
    res = dfs(array,i+1,d,k)
    if res: return res
    
N,D,K = map(int,raw_input().split())
print " ".join(map(str,dfs([],1,0,0)))
0