Skip to content

Instantly share code, notes, and snippets.

@KT-Yeh
Created January 21, 2014 05:51
Show Gist options
  • Save KT-Yeh/8535010 to your computer and use it in GitHub Desktop.
Save KT-Yeh/8535010 to your computer and use it in GitHub Desktop.
#include <cstdio>
using namespace std;
char s[100000],t[100000];
int main()
{
// freopen ("input.txt","rt",stdin);
while (scanf("%s%s",s,t)!=EOF){
int i=0,j=0;
for (;t[i];i++){
if (t[i] == s[j]) j++;
}
if (!s[j]) printf("Yes\n");
else printf("No\n");
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment