会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
frankM
天下武功,唯快不破。
博客园
|
首页
|
新随笔
|
新文章
|
联系
|
订阅
|
管理
上一页
1
···
7
8
9
10
11
12
13
14
15
···
18
下一页
2014年6月14日
POJ 3253 Fence Repair
摘要: 链接:http://poj.org/problem?id=3253每次都找出最短的两个合并..优先队列#include #includeusing namespace std;int main(){ int n; int i; int t; int a,b; long ...
阅读全文
posted @ 2014-06-14 17:49 frankM
阅读(133)
评论(0)
推荐(0)
编辑
2014年6月12日
POJ 2431 Expedition
摘要: 链接:http://poj.org/problem?id=2431当燃料用完后,选择经过的所有加油站中能加的油最多的..所以,在之后需要加油时,就认为在之前经过的加油站加油就可以了..优先队列#include #include#includeusing namespace std;class fue...
阅读全文
posted @ 2014-06-12 16:54 frankM
阅读(202)
评论(0)
推荐(0)
编辑
2014年6月10日
NYOJ 269 VF
摘要: 链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=269求1~10^9间各位相加和为s的数的个数..dp[i][j]:::前i位和为j的数字的个数 #include using namespace std;int dp[11][90];void ...
阅读全文
posted @ 2014-06-10 22:32 frankM
阅读(105)
评论(0)
推荐(0)
编辑
2014年6月8日
NYOJ 456 邮票分你一半
摘要: 链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=456价值与重量相等的01背包..背包的容量为邮票总和的一半#include #include#include#includeusing namespace std;int dp[500005];...
阅读全文
posted @ 2014-06-08 09:09 frankM
阅读(179)
评论(0)
推荐(0)
编辑
2014年6月7日
划分数问题 DP
摘要: 《挑战程序设计竞赛》2.3.3:有n个无区别的物品,将他们划分成不超过m组,求出划分方法数模M的余数称做n的m划分,dp定义如下:dp[ i ] [ j ] =j的i划分的总数;考虑n的m划分ai (a1+a2+a3+...+am ==n) ,对于每个i都有ai>0,,So..{ai-1} 也就对应...
阅读全文
posted @ 2014-06-07 17:53 frankM
阅读(505)
评论(0)
推荐(1)
编辑
2014年6月6日
HDU 1253 胜利大逃亡
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1253宽度优先搜索:#include #include#include#define INF 10000000using namespace std;class p{public: int x; ...
阅读全文
posted @ 2014-06-06 13:32 frankM
阅读(160)
评论(0)
推荐(0)
编辑
2014年6月4日
NYOJ 294 Bot Trust
摘要: 链接: http://acm.nyist.net/JudgeOnline/problem.php?pid=294一步一步模拟出来的....把情况考虑全面: “Both robots know the full sequence in advance” #include #include#includ...
阅读全文
posted @ 2014-06-04 15:19 frankM
阅读(125)
评论(0)
推荐(0)
编辑
2014年6月1日
NYOJ 36 最长公共子序列
摘要: 链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=36经典dp题:#include #includeusing namespace std;int dp[1005][1005];char a[1005];char b[1005];int main...
阅读全文
posted @ 2014-06-01 17:45 frankM
阅读(141)
评论(0)
推荐(0)
编辑
HDU 1555 How many days?
摘要: 链接:http://acm.hdu.edu.cn/showproblem.php?pid=1555模拟一下就行了..注意不要忘了musing namespace std;int main(){ int m,k; int ans; while(cin>>m>>k&&m+k!=0) ...
阅读全文
posted @ 2014-06-01 17:24 frankM
阅读(129)
评论(0)
推荐(0)
编辑
2014年5月31日
01背包 (大数据)
摘要: 经典的01背包问题,如果把限制条件改为:重量#include#define INF 10000000using namespace std;int c[105],v[105];int dp[10005]; //dp[i],表示在价值i下的最小重量int main(){ ...
阅读全文
posted @ 2014-05-31 12:29 frankM
阅读(589)
评论(0)
推荐(0)
编辑
上一页
1
···
7
8
9
10
11
12
13
14
15
···
18
下一页
公告