Accepted
Code
#include <bits/stdc++.h>
using namespace std;
#define int long long int
const int N = 1e5 + 10;
// int a[N];
main()
{
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
cout.tie(nullptr);
int t;
cin >> t;
const string target = "SeriousOJ";
while (t--)
{
int n, flag = 0;
cin >> n;
string s;
cin >> s;
int i = 0, j = 0;
while (i < 9 && j < s.length())
{
if (s[j] == target[i])
{
i++;
}
j++;
}
if (i == 9)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
}
Information
- Submit By
- Type
- Submission
- Problem
- P1147 SeriousOJ Challenge
- Contest
- LU IUJPC : Sylhet Division 2024 Replay Contest
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-10 09:53:36
- Judged At
- 2024-12-10 09:53:36
- Judged By
- Score
- 100
- Total Time
- 3ms
- Peak Memory
- 816.0 KiB