Last active
September 16, 2018 16:24
-
-
Save WindAzure/7d88d4e31610ed4bc277e412e128ac45 to your computer and use it in GitHub Desktop.
UVa 10340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
using namespace std; | |
int main() | |
{ | |
char s[1000], t; | |
while (~scanf("%s", s)) | |
{ | |
getchar(); | |
auto currentPos = 0; | |
while ((t = getchar()) && t !='\n') | |
{ | |
if (t == s[currentPos]) | |
{ | |
currentPos++; | |
} | |
} | |
if (currentPos == strlen(s)) | |
{ | |
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