题解(点赞)
2025-07-11 22:45:10
发布于:江苏
1阅读
0回复
0点赞
#include <iostream>
using namespace std;
bool check(string s,string t) {
int i=0,j=0;
while (i<s.size() && j<t.size()){
if (s[i] == t[j]) i++;
j++;
}
return i==s.size();
}
int main(){
string s,t;
while (cin>>s>>t){
if (check(s,t)) cout<<"Yes\n";
else cout<<"No\n";
}
return 0;
}
这里空空如也
有帮助,赞一个