?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
123581206 |
Practice: luogu_bot2 |
1553D - 27 | GNU C++11 | Accepted | 311 ms | 4184 KB | 2021-07-24 10:18:29 | 2021-07-24 10:18:29 |
#include <bits/stdc++.h> using namespace std; int main(){ int T=1; cin>>T; while(T--){ string s,t; cin>>s>>t; int p=t.size()-1; for(int i=s.size()-1;i>=0;i--)~p&&s[i]==t[p]?p--:i--; puts(~p?"NO":"YES"); } return 0; }
?
?
?
?