/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 532.0 KiB
#2 Accepted 1ms 764.0 KiB
#3 Accepted 1ms 328.0 KiB
#4 Accepted 1ms 532.0 KiB
#5 Accepted 1ms 340.0 KiB
#6 Accepted 2ms 768.0 KiB
#7 Accepted 1ms 532.0 KiB

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
Submission
Problem
P1020 Favourite footballer
Language
C++17 (G++ 13.2.0)
Submit At
2023-12-29 15:06:11
Judged At
2024-11-11 03:46:57
Judged By
Score
100
Total Time
2ms
Peak Memory
768.0 KiB