Section 2.3 Money Systems
来源:互联网 发布:java入门与实战教程 编辑:程序博客网 时间:2024/05/29 12:50
动态规划思想, 完全背包,迭代。
f[i+j] := f[i+j] + f[i];
{
ID: yaoyuan4
PROG: money
LANG: PASCAL
}
Program money;
const
inf = 'money.in'; outf = 'money.out';
var
v, n, i, j, a : longint;
f : array[0..10000] of int64;
begin
assign(input, inf); reset(input);
readln(v, n);
fillchar(f, sizeof(f), 0);
f[0] := 1;
for i := 1 to v do
begin
read(a);
for j := 0 to n - a do
inc(f[j+a], f[j]);
end;
close(input);
assign(output, outf); rewrite(output);
writeln(f[n]);
close(output);
end.
- Section 2.3 Money Systems
- USACO section 2.3 Money Systems(dp)
- USACO-Section 2.3 Money Systems(DP)
- USACO Section 2.3 Money Systems - 矮油.有Trick阿...
- USACO 2.3 Money Systems (money)
- USACO 2.3.4 Money Systems
- USACO--2.3Money Systems+dp
- USACO 2.3.4 Money Systems
- USACO 2.3 Money Systems 题解
- Money Systems
- Money Systems
- Money Systems
- USACO 2.3 Money Systems (DP 动态规划)
- USACO 2.3Money Systems(简单DP)
- USACO2.3.4 Money Systems (money)
- USACO2.3.4 Money Systems (money)
- usaco: Money Systems
- usaco Money Systems
- Winform控件多线程操作控件的解决方案 ( 转 )
- MsSql2005如何进行自动定时备份数据库
- VC++的Unicode编程
- 一个aspx、母版页、自定义控件的页面的生命周期小结
- 什么是云计算
- Section 2.3 Money Systems
- 《c#本质论》读书笔记一
- java中的泛型
- org.dom4j.Document.valueOf("/rss/channel/y:location/@city")的一个疑问_稍后研究
- 劝学新语
- vs调试时,变量值以十六进制显示
- shell实例(六) ---字符串操作
- 3月8日画颗钻石送给老婆
- MTK添加短信同号删除功能