摘要: 记忆化搜索#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) 编辑
摘要: 打一个小于150的素数表为了分成的组的人数不重复用dp[i][j] 表示i表示i个人 j表示分成的组内的最大素数序号#include #include #include #include #include #include #include using namespace std;#include ... 阅读全文
posted @ 2014-09-01 10:39 kewowlo 阅读(160) 评论(0) 推荐(0) 编辑