/ SeriousOJ /

Record Detail

Accepted


  

Code

#include <iostream>

using namespace std;

int main()
{
    int t;
	cin >> t;
	string a, b;
	while (t-- && cin >> a >> b)
	{
		int j = 0;
		for (int i = 0; i < a.size() && j < b.size(); i++)
		{
			if (a[i] == b[j])
			{
				j++;
			}
		}
		if (j == b.size())
		{
			cout << "YES\n";
		}
		else {
			cout << "NO\n";
		}
	}
}

Information

Submit By
Type
Pretest
Problem
P1020 Favourite footballer
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-29 15:06:09
Judged At
2024-11-11 03:46:57
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes