?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
126196171 |
Practice: luogu_bot2 |
1553D - 27 | C++14 (GCC 6-32) | Accepted | 390 ms | 4032 KB | 2021-08-17 19:07:28 | 2021-08-17 19:07:28 |
#include <bits/stdc++.h> using namespace std; int a=1,p; int main(){ cin>>a; while(a--){ string s,t; cin>>s>>t; 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; }
?
?
?
?