Accepted
Code
#include <bits/stdc++.h>
using namespace std;
int main() {
int t=1;
cin>>t;
while(t--){
int n;
cin>>n;
if (n<9)
{
cout << " NO" << endl;
}
string s = "SeriousOJ";
int j=0;
for (int i = 0; i < n; i++)
{
char ch;
cin>>ch;
if (ch==s[j])
{
j++;
}
}
if (j==9)
{
cout << "YES" << endl;
}
else
{
cout << " NO" << endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1147 SeriousOJ Challenge
- Contest
- LU IUJPC : Sylhet Division 2024
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-12-09 05:05:47
- Judged At
- 2024-12-09 05:06:36
- Judged By
- Score
- 100
- Total Time
- 12ms
- Peak Memory
- 544.0 KiB