解説動画はこちら!
コード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (n); ++i)
int main() {
string s, t;
cin >> s >> t;
string lowerT = "";
for (auto e : t) lowerT += tolower(e);
int index = 0;
for (auto si : s) {
if (lowerT[index] == si) {
index++;
}
}
if (index >= 3 || (index == 2 && lowerT[2] == 'x')) cout << "Yes" << endl;
else cout << "No" << endl;
return 0;
}
コメント