摘要:Theme SectionTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 271Accepted Submission(s): 121Problem DescriptionIt's time for music! A lot of popular musicians are invited to join us in the music festival. Each of them will play one of their repr
阅读全文
摘要:Milking GridTime Limit:3000MSMemory Limit:65536KTotal Submissions:4738Accepted:1978DescriptionEvery morning when they are milked, the Farmer John's cows form a rectangular grid that is R (1 #include #include #include #include using namespace std;char str[10010][100];int R,C;bool same1(int i,int
阅读全文
摘要:Simpsons’ Hidden TalentsTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 939Accepted Submission(s): 321Problem DescriptionHomer: Marge, I just figured out a way to discover some of the talents we weren’t aware we had.Marge: Yeah, what is it?Homer: T
阅读全文
摘要:Cyclic NacklaceTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1255Accepted Submission(s): 538Problem DescriptionCC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are on
阅读全文
摘要:Count the stringTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2191Accepted Submission(s): 1038Problem DescriptionIt is well known that AekdyCoin is good at string problems as well as number theory problems. When given a string s, we can write dow
阅读全文
摘要:Clairewd’s messageTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1611Accepted Submission(s): 633Problem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing f
阅读全文
摘要:假设主串:S: S[1] S[2] S[3] ……S[n]模式串:T: T[1] T[2] T[3]…..T[m]现在我们假设主串第i 个字符与模式串的第j(j<=m)个字符‘失配’后,主串第i 个字符与模式串的第k(k<j)个字符继续比较,此时就有S[i] != T[j]主串: S[1]...S[i-j+1]...S[i-1]S[i]... ||(匹配) || ≠模式串: T[1]... T[j-1] T[j]由此,可以得到关系式如下 T[1]T[2]T[3]...T[j-1] = S[i-j+1]...S[i-1]由于S[i] != T[j],接下来S[i]将与T[k]继续比较
阅读全文
摘要:Power StringsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 23112Accepted: 9691DescriptionGiven 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 multiplica
阅读全文
摘要:PeriodTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 9696Accepted: 4428DescriptionFor each prefix of a given string S with N characters (eac...
阅读全文
摘要:Number SequenceTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5898Accepted Submission(s): 2652Problem DescriptionGiven two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 100
阅读全文
摘要:OulipoTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12818Accepted: 5128DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’a
阅读全文