POJ 1936 All in All

😂

C++ Code

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <iostream>
#include <stdio.h>
#include <algorithm>
#include <string.h>

using namespace std;

int main(){
char s[100002];
char t[100002];
while(~scanf("%s %s", s, t)){
int slen = strlen(s);
int tlen = strlen(t);
int i = 0;
int j = 0;
while(i < slen && j < tlen){
if(s[i] == t[j])
i++;
j++;
}
if(i == slen)
printf("Yes\n");
else
printf("No\n");
}
return 0;
}