?
# | Author | Problem | Lang | Verdict | Time | Memory | Sent | Judged | |
---|---|---|---|---|---|---|---|---|---|
257139144 |
Practice: Traverser_Steal69 |
1553D - 27 | C++14 (GCC 6-32) | Accepted | 250 ms | 64 KB | 2024-04-18 11:01:22 | 2024-04-18 11:01:22 |
#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;}
?
?
?
?