Kmp
蒟蒻的ACMer
2014界大学新生
展开
-
hdu Cyclic Nacklace kmp
A - Cyclic Nacklace Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description CC always becomes very depressed at the end of this month, he原创 2016-04-26 19:47:51 · 576 阅读 · 0 评论 -
POJ 3080 Blue Jeans kmp+暴力枚举
D - Blue Jeans Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Description The Genographic Project is a research partnership between IBM and原创 2015-08-11 08:27:54 · 904 阅读 · 0 评论 -
POJ 3461 Oulipo kmp 水过
Oulipo Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 29178 Accepted: 11690 Description The French author Georges Perec (1936–1982) once wrote a book, La原创 2015-08-11 09:41:49 · 795 阅读 · 0 评论 -
KMP 练习
A - KMP模式匹配 一(串) Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu Submit Status Description 求子串的next值,用next数组存放,全部输出 Input 输入一个字符串原创 2015-08-13 14:48:21 · 931 阅读 · 0 评论 -
POJ 2406 Power Strings kmp
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 37817 Accepted: 15653 Description Given two strings a and b we define a*b to be their concate原创 2015-08-15 11:39:59 · 1117 阅读 · 0 评论 -
POJ 1961 Period kmp
Period Time Limit: 3000MS Memory Limit: 30000K Total Submissions: 14726 Accepted: 7009 Description For each prefix of a given string S with N characters (each character原创 2015-08-15 13:30:12 · 807 阅读 · 0 评论 -
POJ 2752 Seek the Name, Seek the Fame kmp
Seek the Name, Seek the Fame Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 14266 Accepted: 7108 Description The little cat is so famous, that many couples原创 2015-08-15 14:10:34 · 837 阅读 · 0 评论 -
HDU 1711 Number Sequence kmp
Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 15821 Accepted Submission(s): 6978 Problem Description Given two se原创 2015-08-31 19:47:30 · 853 阅读 · 0 评论 -
大二训练第一周 A - The Minimum Length
A - The Minimum Length Time Limit:1000MS Memory Limit:131072KB 64bit IO Format:%lld & %llu Submit Status Description There is a string A. The length of A is less than 1,000,000原创 2015-11-02 20:54:07 · 760 阅读 · 0 评论 -
大二训练第一周 C - Revolving Digits &&hdu 4333 扩展kmp
C - Revolving Digits Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description One day Silence is interested in revolving the digits of a p原创 2015-11-05 19:57:14 · 685 阅读 · 0 评论 -
HDU 5763 Another Meaning
对于这个问题,显然可以进行DP: 令dp[i]表示到i结尾的字符串可以表示的不同含义数,那么考虑两种转移: 末尾不替换含义:dp[i - 1] 末尾替换含义:dp[i - |B|] (A.substr(i - |B| + 1,|B|) = B) 那么对于末尾替换含义的转移,需要快速判断BB能不能和当前位置的后缀匹配,kmp或者hash判断即可。 复杂度:O(原创 2016-07-30 10:54:29 · 292 阅读 · 0 评论