| ||||||||||
| 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>
#include<stdio.h>
#define MAXSIZE 100000
using namespace std;
void cmp(char s[],char t[]){
int i=0,j=0,sum=0;
while(s[i]!='\0'){
while(t[j]!='\0'){
if(s[i]==t[j]){
j++;
sum++;
break;
}
j++;
}
i++;
}
if(sum==i) cout<<"Yes"<<endl;
else cout<<"No"<<endl;
}
int main(){
char s[MAXSIZE],t[MAXSIZE];
while(scanf("%s %s",s,t)!=EOF){
cmp(s,t);
}
return 0;
}
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator