上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页
摘要: #define maxnode 60101#define sigma_size 26struct trie{ int ch[maxnode][sigma_size]; int val[maxnode]; int sz; void init() { cler... 阅读全文
posted @ 2014-09-05 16:01 kewowlo 阅读(148) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #include #define cler(... 阅读全文
posted @ 2014-09-03 16:16 kewowlo 阅读(130) 评论(0) 推荐(0) 编辑
摘要: 排序后dp写代码的速度还不够快。。。#include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #inc... 阅读全文
posted @ 2014-09-02 15:47 kewowlo 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 将一门课学习几天当成一个物品一门课中的m天 只能选择其中的一天所以对于第i门课来说 用dp数组储存当前这门课的最大值 用out储存这门课选择了一天后的最大值#include #include #include #include #include #include #include usi... 阅读全文
posted @ 2014-09-02 15:00 kewowlo 阅读(137) 评论(0) 推荐(0) 编辑
摘要: 思路:黑书递归割x边或y边 取上或取下四个选择#include #include #include #include #include #include #include using namespace std;#include #include #include #include #include... 阅读全文
posted @ 2014-09-02 14:04 kewowlo 阅读(152) 评论(0) 推荐(0) 编辑
摘要: 题意:求最少按键盘多少次注意当大写开关开着时按shift打出来的是小写dp[i][j] i==0表示没开大写 i==1 表示开大写;#include #include #include #include #include #include #include using namespace std;#... 阅读全文
posted @ 2014-09-02 10:04 kewowlo 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 要求输出的路径的字典序最小,所以要从后往前转移状态,每次都取最小的行序号#include #include #include #include #include #include #include using namespace std;#include #include #include #inc... 阅读全文
posted @ 2014-09-02 09:16 kewowlo 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 记忆化搜索#include #include #include #include #include #include #include using namespace std;#include #include #include #include #include #include #define ... 阅读全文
posted @ 2014-09-01 22:09 kewowlo 阅读(151) 评论(0) 推荐(0) 编辑
摘要: 类似于叠箱子对于箱子a : (a1,a2,a3),b : (b1,b2,b3)存在一个顺序ai#include #include #include #include #include #include using namespace std;#include #include #include #i... 阅读全文
posted @ 2014-09-01 19:29 kewowlo 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 需要放满格子,所以N为奇数时ans应该为0;当前格子放的状态用表示0-7的二进制来表示初始化第一列时先令036为1第i列可有前一列的状态转化而来i-1列 当前第i列 7->0 6-> 1 5-> 2 4,7 -> 3 3 -> 4 2 -> 5 1,7 -> 6 3,6... 阅读全文
posted @ 2014-09-01 15:40 kewowlo 阅读(135) 评论(0) 推荐(0) 编辑
上一页 1 ··· 7 8 9 10 11 12 13 14 15 ··· 21 下一页