Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<stdio.h>
- #include<string.h>
- int main()
- {
- char a[100000],b[100000],c[100000];
- int i,j,k,lna,lnb;
- while(scanf("%s %s",a,b)!=EOF){
- lna=strlen(a);
- lnb=strlen(b);
- memset(c,0,1000);
- i=0;
- j=0;
- k=0;
- while(j<lnb){
- if(i==lna)
- break;
- if(a[i]==b[j]){
- c[k]=b[j];
- k++;
- i++;
- j++;
- continue;
- }
- j++;
- }
- if(strcmp(a,c)==0)
- printf("Yes\n");
- else
- printf("No\n");
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement