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
- 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