问题 All in All UVA10340
问题描述
代码
/*
Dreams never shine!
It's you that shine while chasing your dreams :)
JAYO!!
*/
#include <iostream>
#include <cstring>
using namespace std;
const int LEN = 100024;
char s[LEN], t[LEN];
int main() {
while (scanf("%s%s", s, t) == 2) {
int sLen = strlen(s), tLen = strlen(t);
bool ok = true;
for (int i = 0, j = 0; i < sLen; i++, j++) {
while (j < tLen && t[j] != s[i]) j++;
if (j == tLen) {
ok = false; break;
}
}
printf("%s\n", ok ? "Yes" : "No");
}
return 0;
}
总结
装系统装了一天,会不当初,删的容易啊,扔掉容易啊,
但是,再找回来呢?
也许永远都找不回来了!
珍惜自己所拥有的一切,专注于自己要走的路!!!
第 4 题! Over**