摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=456 0-1背包问题,现在发现我对0-1背包问题有点理解了 我的代码: #include<stdio.h> #include<string.h> #include<algorithm> us 阅读全文
posted @ 2014-12-16 23:22 wojiaohuangyu 阅读(16) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=289 0-1背包水过~~ 我的代码: #include<stdio.h> #include<string.h> #include<algorithm> using namespace std 阅读全文
posted @ 2014-12-16 18:59 wojiaohuangyu 阅读(9) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=325 本道题目使用的是0-1背包,不过貌似用0-1背包效果不怎么好,参考别人的代码险过~ 我的代码: #include<stdio.h> #include<string.h> #includ 阅读全文
posted @ 2014-12-16 18:56 wojiaohuangyu 阅读(11) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=269 其实使用0-1背包不怎么熟练,看完这个讲解后才算是对这道题目理解了: http://blog.csdn.net/u013050857/article/details/38373119 阅读全文
posted @ 2014-12-16 18:50 wojiaohuangyu 阅读(9) 评论(0) 推荐(0)
摘要: 题目链接:http://acm.nyist.net/JudgeOnline/problem.php?pid=252 简单水题 代码: #include<stdio.h> #include<string.h> int main(){ int n,t; int num[120]; memset(num, 阅读全文
posted @ 2014-12-16 18:48 wojiaohuangyu 阅读(11) 评论(0) 推荐(0)