| ||||||||||
| 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 | |||||||||
为什么啊,一重循环还判超时阿?#include <iostream.h>
#include <string.h>
char str[5000000],temp[5000000];
void remain(){
while(cin>>str>>temp)
{
unsigned long count=0;
for(unsigned long i=0;i<strlen(temp);i++)
{
if(str[count]==temp[i]) count++;
if(count==strlen(str)) break;}
if(count==strlen(str)) cout<<"Yes"<<endl;
else
cout<<"No"<<endl;
}
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator