2012年8月30日

hdu 1358Period

摘要: PeriodTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1326Accepted Submission(s): 637Problem DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether 阅读全文

posted @ 2012-08-30 20:58 仁者无敌8勇者无惧 阅读(421) 评论(0) 推荐(0) 编辑

poj 2046Power Strings

摘要: View Code 1 #include<stdio.h> 2 #include<string.h> 3 char str[1000010]; 4 int next[1000010]; 5 int get_next(int x) 6 { 7 int i=0,j=-1; 8 next[0]=-1; 9 while(i<x)10 {11 if(j==-1||str[i]==str[j])12 {13 i++;14 j++;15 if(str[i]!=str[j]... 阅读全文

posted @ 2012-08-30 12:08 仁者无敌8勇者无惧 阅读(156) 评论(0) 推荐(0) 编辑

导航