Skip to content

Instantly share code, notes, and snippets.

@WindAzure
Last active September 16, 2018 16:24
Show Gist options
  • Save WindAzure/7d88d4e31610ed4bc277e412e128ac45 to your computer and use it in GitHub Desktop.
Save WindAzure/7d88d4e31610ed4bc277e412e128ac45 to your computer and use it in GitHub Desktop.
UVa 10340
#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