随笔分类 -  HiHo

hiho 第七周 完全背包
摘要:完全背包 1 #include 2 #include 3 #include 4 using namespace std; 5 #define maxn 505 //刚开始不小心打成105了、、、只有75,改成505,就100了 6 #define maxm 100005 7 int need[m... 阅读全文
posted @ 2014-08-23 02:03 lpt 阅读(164) 评论(0) 推荐(0)
hiho 第六周 01背包
摘要:简单的01背包,没有报名,这周的没有权限提交 1 #include 2 #include 3 using namespace std; 4 #define maxn 505 5 #define maxm 100005 6 int need[maxn],value[maxn]; 7 int dp[ma... 阅读全文
posted @ 2014-08-23 02:01 lpt 阅读(204) 评论(0) 推荐(0)
hiho 第二周
摘要:Trie树,第一次写,简单的建树+搜索它的思路hiho上讲得很清楚,good~ 1 #include 2 #include 3 using namespace std; 4 char word[11]; 5 int n,m; 6 struct trie 7 { 8 int num; 9 ... 阅读全文
posted @ 2014-07-16 19:54 lpt 阅读(143) 评论(0) 推荐(0)