| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
注意:这次有几个题目的输入都比较大,请大家尽量使用c的IO函数这话谁写的!误导嘛!
#include <iostream>
#include <cstring>
using namespace std;
int main(){
char S[400001];
while(cin>>S){
int len,i;
len=strlen(S);
for(i=0;i<len-1;i++){
if(strncmp(S,&S[len-1-i],i+1)==0){
cout<<i+1<<" ";
}
}
cout<<len<<endl;
}
system("pause");
return 0;
}
照样超时~~~~~~~~~~~郁闷...应该怎么办?
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator