begin
if sum>=b then begin
if min>sum-b then min:=sum-b; exit; end;
for i:=x+1 to n do dfs(i,sum+h[i]); end; begin
assign(input,'1.txt'); reset(input);
assign(output,'o.txt'); rewrite(output); readln(n,b); for i:=1 to n do readln(h[i]); min:=maxlongint; dfs(0,0); writeln(min); close(input); close(output); end.
输入 8 23 1 2 5 5 6 4 3 1 输出
百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库noip普及组复赛模拟试题11答案(2)在线全文阅读。
相关推荐: