Period Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4485 Accepted Submission(s): 2163 Problem Description For each prefix of a given string S with N characters (each character has an ASCII…
HDU 1711 Number Sequence(模板题) #include <cstdio> ; ; int N, M; int textS[MAXN]; int tarS[MAXL]; int next[MAXL]; void GetNextVal( int* s, int* nextval, int len ) { , j = -; nextval[] = -; while ( i < len ) { || s[i] == s[j] ) { ++i, ++j; nextval[i]…
Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ...... , a[K + M - 1] = b[M].…
亲和串 Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10862 Accepted Submission(s): 4940 Problem Description 人随着岁数的增长是越大越聪明还是越大越笨,这是一个值得全世界科学家思考的问题,同样的问题Eddy也一直在思考,因为他在很小的时候就知道亲和串如何判断了,但是发现,现在长…
Oulipo Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8732 Accepted Submission(s): 3526 Problem Description The French author Georges Perec (1936–1982) once wrote a book, La disparition, wit…
Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 17971 Accepted Submission(s): 7854 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b…
Number Sequence Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 15149 Accepted Submission(s): 6644 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b…
Number Sequence Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K + 1] = b[2], ......…
Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation by a non-negative inte…
Simpsons’ Hidden Talents Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4543 Accepted Submission(s): 1648 Problem Description Homer: Marge, I just figured out a way to discover some of the t…
Power Strings Time Limit: 3000MS Memory Limit: 65536K Total Submissions: 37685 Accepted: 15590 Description Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "…
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 30893 Accepted Submission(s): 12981 Problem Description Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b…