noip普及组复赛模拟试题11答案(2)

2019-01-26 14:38

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 输出


noip普及组复赛模拟试题11答案(2).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:华中师范大学2011年教育学院硕士研究生招生专业目录

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: