![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
KMP和Manacher
文章平均质量分 81
_pkm_
love coding
展开
-
C - 剪花布条 HDU2087( kmp找子串,子串不能有重叠 )
C - 剪花布条 Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description 一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input 输入中含有一原创 2015-04-16 20:00:54 · 657 阅读 · 0 评论 -
B - Oulipo poj 3461 (kmp 找子串的数,子串可以有重叠)
B - Oulipo Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description The French author Georges Perec (1936�1982) once wrote a book, La disparition, without t原创 2015-04-16 19:53:17 · 1578 阅读 · 0 评论 -
E - Period poj1611(kmp 计算前缀循环节)
E - Period Time Limit:1000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description For each prefix of a given string S with N characters (each character has an ASCII code原创 2015-04-16 20:46:43 · 665 阅读 · 0 评论 -
A - Number Sequence HDU1005 ( kmp 算法+整数数组的应用)
A - Number Sequence Time Limit:5000MS Memory Limit:32768KB 64bit IO Format:%I64d & %I64u Submit Status Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...原创 2015-04-16 17:40:21 · 836 阅读 · 0 评论 -
D - Cyclic Nacklace HDU3746 (kmp 计算字符串最小循环节 )
D - 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 has checked his c原创 2015-04-16 20:23:47 · 732 阅读 · 0 评论 -
F - The Minimum Length HUST1010( kmp计算最小循环节)
F - 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. I rewrite it aga原创 2015-04-16 20:57:44 · 625 阅读 · 0 评论 -
G - Power Strings POJ 2406 (字符串的周期)
G - Power Strings Time Limit:3000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64u Submit Status Practice POJ 2406 Description Given two strings a and b we define a*b to be their concatenati原创 2015-05-27 18:34:57 · 1487 阅读 · 0 评论 -
HDU 5745(暴力)
题目链接 暴力出奇迹。。。 暴力匹配就好了,因为每个字符可以也只能交换一次位置,所以当前位置不配的话,就检查一下交叉的位置#include<bits/stdc++.h> using namespace std; #define cl(a,b) memset(a,b,sizeof(a)) #define LL long long #define pb push_back #define gcd _原创 2016-07-23 14:01:39 · 486 阅读 · 0 评论 -
#1032 : 最长回文子串 (Manacher算法)
这篇博文对Manacher讲的还不错 #1032 : 最长回文子串 时间限制:1000ms 单点时限:1000ms 内存限制:64MB 描述 小Hi和小Ho是一对好朋友,出生在信息化社会的他们对编程产生了莫大的兴趣,他们约定好互相帮助,在编程的学习道路上一同前进。 这一天,他们遇到了一连串的字符串,于是小Hi就向小Ho提出了那个经典的问题:“小Ho,你能不能分别在这些原创 2015-04-23 10:21:25 · 748 阅读 · 0 评论