提交时间:2024-01-09 20:13:35
运行 ID: 119631
#include <bits/stdc++.h> using namespace std; int main(){ string s,t; cin>>s>>t; int cur = 0; for(int i = 0;i<t.size();i++){ if(cur==s.size()){ cout<<"true"<<endl; return 0; } if(t[i]==s[cur]) cur++; } if(cur==s.size()){ cout<<"true"<<endl; return 0; } cout<<"false"<<endl; return 0; }