General
 
 
# Author Problem Lang Verdict Time Memory Sent Judged  
206369495 Practice:
Jayesh101
1553D - 27 C++17 (GCC 7-32) Accepted 389 ms 384 KB 2023-05-18 20:16:40 2023-05-18 20:16:40
→ Source
#include <bits/stdc++.h>
using namespace std;
string s,t;
int T;
int main(){
    for(cin>>T;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;
}
?
Time: ? ms, memory: ? KB
Verdict: ?
Input
?
Participant's output
?
Jury's answer
?
Checker comment
?
Diagnostics
?
Click to see test details