并没有什么卵用。我马上大二了,大一两学期目测切了1000道水题了,毫无意义。至今不理解kmp和后缀数组,只会模板。数论和博弈论是什么?能吃吗?只会打表。图论至今不会tarjan,话说dlx是什么?插头dp,这是什么?数据结构还好,经常做高中生的题,可持久化可持久化线段树也能花一下午时间写出来,然而并...
分类:
其他好文 时间:
2015-06-15 14:26:37
阅读次数:
226
注意此处说的是重复的最长子串,只要出现重复就好,没说重复的次数。
下面给出的代码是编程珠玑中给出的一种实现。
他是通过后缀数组的方式实现的。
#include
#include
#include
using namespace std;
int comlen(char*p, char*q)//找出公共的最长子串
{
int i = 0;
if (p == NULL || q == NUL...
分类:
其他好文 时间:
2015-06-15 01:47:35
阅读次数:
218
这周一开始是想做后缀数组 没看下去 有神奇般的去做线段树的题 被一道线段树+离散化+扫描法的题卡了两天 后来终于憋出来了http://www.cnblogs.com/yifi/archive/2015/06/03.html
分类:
其他好文 时间:
2015-06-15 00:00:40
阅读次数:
249
Description
In the deep universe, there is a beautiful planet named as CS on which scientists have decided to build Immense Colossal Particle Collider (i.e. ICPC) to find the ultimate theory of t...
分类:
编程语言 时间:
2015-06-10 12:24:37
阅读次数:
135
Description
FJ is about to take his N (1 ≤ N ≤ 30,000) cows to the annual"Farmer of the Year" competition. In this contest every farmer arranges his cows in a line and herds them past the judges.
...
分类:
编程语言 时间:
2015-06-08 23:25:46
阅读次数:
195
Description
Given a sequence, {A1, A2, ..., An} which is guaranteed A1 > A2, ..., An, you are to cut it into three sub-sequences and reverse them
separately to form a new one which is the smalle...
分类:
编程语言 时间:
2015-06-08 21:40:56
阅读次数:
290
Description
You are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given ...
分类:
编程语言 时间:
2015-06-08 15:03:25
阅读次数:
125
Description
You are the King of Byteland. Your agents have just intercepted a batch of encrypted enemy messages concerning the date of the planned attack on your island. You immedietaly send for ...
分类:
编程语言 时间:
2015-06-08 13:30:27
阅读次数:
129
Description
You may have wondered why most extraterrestrial life forms resemble humans, differing by superficial traits such as height, colour, wrinkles, ears, eyebrows and the like. A few bear no ...
分类:
编程语言 时间:
2015-06-08 11:41:51
阅读次数:
150