上一页 1 2 3 4 5 6 7 8 9 10 ··· 182 下一页
摘要: AC自动机,用40^4 * 50 * 10的空间进行dp。最大的难点在于hash。hash一个数列f,数列中的每一位都有一个上限g,即f[i]#include #include #include #include using namespace std;#define D(x) const int ... 阅读全文
posted @ 2015-03-30 21:19 undefined2024 阅读(157) 评论(0) 推荐(0)
摘要: 题意:给出n(1using namespace std;#define D(x) const int MOD = (int)(1e9) + 7;const int MAX_FACTOR = 40;int n;int factor_num;long long factor[MAX_FACTOR];lo... 阅读全文
posted @ 2015-03-29 21:55 undefined2024 阅读(212) 评论(0) 推荐(0)
摘要: AC自动机+状态压缩DP注意:相同的串可能出现多次,如果匹配成功则将各次权值加和。#include #include #include using namespace std;#define D(x) const int MAX_N = 15;const int MAX_LEN = 105;cons... 阅读全文
posted @ 2015-03-27 21:19 undefined2024 阅读(115) 评论(0) 推荐(0)
摘要: AC自动机+DP#include #include #include using namespace std;#define D(x) const int MAX_D_LEN = 25;const int MAX_LEN = 88;const int MAX_N = 105;const int MA... 阅读全文
posted @ 2015-03-24 20:54 undefined2024 阅读(145) 评论(0) 推荐(0)
摘要: AC自动机+DP#include #include #include using namespace std;#define D(x) const int MAX_D_LEN = 25;const int MAX_LEN = 1005;const int MAX_N = 55;const int M... 阅读全文
posted @ 2015-03-24 20:13 undefined2024 阅读(332) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 9 10 ··· 182 下一页