2017年9月12日

poj3208 Apocalypse Someday 数位dp+二分 求第K(K <= 5*107)个有连续3个6的数。

摘要: /** 题目:poj3208 Apocalypse Someday 链接:http://poj.org/problem?id=3208 题意:求第K(K #include #include #include #include #include #include using namespace std; #define P pair #define ms(x,y) memset(x,y,size... 阅读全文

posted @ 2017-09-12 17:51 hnust_accqx 阅读(190) 评论(0) 推荐(0)

zoj3228 Searching the String AC自动机查询目标串中模式串出现次数(分可覆盖,不可覆盖两种情况)

摘要: /** 题目:zoj3228 Searching the String 链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=3441 题意:给定一个长度为N(N #include #include #include #include #include #include using namespace std; #defin... 阅读全文

posted @ 2017-09-12 16:31 hnust_accqx 阅读(142) 评论(0) 推荐(0)

pku1204 Word Puzzles AC自动机 二维字符串矩阵8个方向找模式串的起点坐标以及方向 挺好的!

摘要: /** 题目:pku1204 Word Puzzles 链接:http://poj.org/problem?id=1204 题意:给定一个L C(C #include #include #include #include #include using namespace std; #define P pair #define ms(x,y) memset(x,y,sizeof x) #defi... 阅读全文

posted @ 2017-09-12 15:27 hnust_accqx 阅读(160) 评论(0) 推荐(0)

hdu3065 病毒侵袭持续中 AC自动机入门题 N(N <= 1000)个长度不大于50的模式串(保证所有的模式串都不相同), 一个长度不大于2000000的待匹配串,求模式串在待匹配串中的出现次数。

摘要: /** 题目:hdu3065 病毒侵袭持续中 链接:http://acm.hdu.edu.cn/showproblem.php?pid=3065 题意:N(N using namespace std; #define P pair #define ms(x,y) memset(x,y,sizeof x) #define LL long long const int maxn = 22; con... 阅读全文

posted @ 2017-09-12 11:45 hnust_accqx 阅读(147) 评论(0) 推荐(0)

hdu2896 病毒侵袭 AC自动机入门题 N(N <= 500)个长度不大于200的模式串(保证所有的模式串都不相同), M(M <= 1000)个长度不大于10000的待匹配串,问待匹配串中有哪几个模式串,

摘要: /** 题目:hdu2896 病毒侵袭 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2896 题意:N(N using namespace std; #define P pair #define ms(x,y) memset(x,y,sizeof x) #define LL long long const int maxn = 22; const ... 阅读全文

posted @ 2017-09-12 11:28 hnust_accqx 阅读(185) 评论(0) 推荐(0)

hdu2222 KeyWords Search AC自动机入门题

摘要: /** 链接:http://acm.hdu.edu.cn/showproblem.php?pid=2222 题意:题意:给定N(N 标记同一种字符串。之后利用标记来统计。 解决方法2:用num[i]标记字典树上某个节点为结尾的字符串出现次数。之后统计的时候,如果是第一次统计它,那么加上它,然后置为-1表示 下次不需要再统计它了。 AC自动机好文章:http://www.cppblog.com/... 阅读全文

posted @ 2017-09-12 10:47 hnust_accqx 阅读(174) 评论(0) 推荐(0)

UVA 11019 Matrix Matcher 矩阵匹配器 AC自动机 二维文本串查找二维模式串

摘要: 链接:https://vjudge.net/problem/UVA-11019lrjP218 matrix matcher #include using namespace std; #define P pair #define ms(x,y) memset(x,y,sizeof x) #define LL long long const int maxn = 22; const int mod... 阅读全文

posted @ 2017-09-12 10:13 hnust_accqx 阅读(159) 评论(0) 推荐(0)

导航