Milk Patterns Time Limit: 5000MS Memory Limit: 65536K Total Submissions: 13669 Accepted: 6041 Case Time Limit: 2000MS Description Farmer John has noticed that the quality of milk given by his cows varies from day to day. On further investigation,…
Description A substring of a string T is defined as: T( i, k)= TiTi+1... Ti+k-1, 1≤ i≤ i+k-1≤| T|. Given two strings A, B and one integer K, we define S, a set of triples (i, j, k): S = {( i, j, k) | k≥ K, A( i, k)= B( j, k)}. You are to give the val…
Maximum repetition substring Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 6328 Accepted: 1912 Description The repetition number of a string is defined as the maximum number R such that the string can be partitioned into R same conse…
Reference:IOI2009论文 http://www.cnblogs.com/ziyi--caolu/p/3192731.html #include "stdio.h" #include "string.h" #define maxn 200010 int wa[maxn],wb[maxn],wv[maxn],ws[maxn]; int rank[maxn],height[maxn]; int r[maxn],sa[maxn]; ],s2[]; int n,…
Long Long Message Time Limit: 4000MS Memory Limit: 131072K Total Submissions: 19206 Accepted: 7934 Case Time Limit: 1000MS Description The little cat is majoring in physics in the capital of Byterland. A piece of sad news comes to him these days:…
Musical Theme Time Limit: 1000MS Memory Limit: 30000K Total Submissions: 14874 Accepted: 5118 Description A musical melody is represented as a sequence of N (1<=N<=20000)notes that are integers in the range 1..88, each representing a key on the…