![](https://img-blog.csdnimg.cn/20201014180756754.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM_图论_kmp
文章平均质量分 73
三茶先生
life is so long,bu needs you to face~
展开
-
Number Sequence
Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 21383 Accepted Submission(s): 9163Problem Description Given two sequences原创 2016-08-04 12:30:13 · 172 阅读 · 0 评论 -
KMP算法(刘汝佳算法书学习)
KMP理解: 假定在匹配中,正在比较的文本串位置和模板串abbaaba最后一个字符不符合(失配),这是朴素算法会将模板串右移一位,继续比较,但是kmp不这样做,kmp认为既然!!位置已经比较过,应该可以利用模板串本身属性判断出右移一位不能匹配,同理,右移两位或者三位也不行,但是右移四位是有可能的。这个时候,需要比较 ‘’‘’*处的字符和abbaaba的第三个字符。下面那个链状图就是一个状态机,其中原创 2017-07-23 20:22:10 · 932 阅读 · 0 评论 -
hdu1358Period
Period Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6632 Accepted Submission(s): 3202Problem Description For each prefix of a given str原创 2016-08-04 13:11:51 · 263 阅读 · 0 评论 -
Revolving Digits(kmp扩展,最小循环数去重+最长后缀)
Revolving Digits Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 25029 Accepted Submission(s): 5452Problem Description One day Silence is原创 2016-08-09 15:18:56 · 257 阅读 · 0 评论 -
POJ3080Blue Jeans
题目的意思大概是多串DNA序列组合,然后你求出其中连续的组合,如果连续数小于3就输出no significant commonalities,否则输出该序列#include <iostream>#include <cstdio>#include <cstring>#include <cmath>#define ll long long#define mod 9901using names原创 2016-08-08 14:45:14 · 224 阅读 · 0 评论 -
HDU3746Cyclic Nacklace
Cyclic Nacklace Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6624 Accepted Submission(s): 2934Problem Description CC always becomes ver原创 2016-08-06 13:03:29 · 206 阅读 · 0 评论 -
A + B for you again
A + B for you again Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6276 Accepted Submission(s): 1551Problem Description Generally speakin原创 2016-08-02 17:15:54 · 251 阅读 · 0 评论 -
HDU3336Count the string
Count the string Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 8572 Accepted Submission(s): 3960Problem Description It is well known tha原创 2016-08-05 17:41:25 · 182 阅读 · 0 评论 -
Simpsons’ Hidden Talents
Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 6687 Accepted Submission(s): 2396Problem Description Homer: Marge原创 2016-08-02 15:22:01 · 1777 阅读 · 0 评论 -
求最长连续字串问题
注意这里讲的是连续,也就是substring,不是subsquence 我们有两个方法,动态规划和直尺法。 dp:建一个c[i][j]数组,表示在第i比较中,最长的连续长度#include <iostream>#include <cstdio>#include <algorithm>#include <cstring>#define N 500010using namespace st原创 2016-08-05 15:10:27 · 404 阅读 · 0 评论 -
Best Reward
Best Reward Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Total Submission(s): 1816 Accepted Submission(s): 739Problem Description After an uphill battle, Ge原创 2016-08-04 18:50:07 · 356 阅读 · 0 评论 -
poj2406Power Strings(KMP)
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 49346 Accepted: 20555 DescriptionGiven two strings a and b we define a*b to be their concatenation. For example,原创 2017-07-24 20:51:32 · 172 阅读 · 0 评论