Accepted
Code
#include<iostream>
#include<string>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
int n;
cin>>n;
string s, tv ="SeriousOJ";;
cin>>s;
int ti=0;
for(int i=0; i<n; i++){
if(s[i]== tv[ti]){
ti++;
}
}
if(ti==tv.size()){
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 10:35:17
- Judged At
- 2024-12-10 10:35:17
- Judged By
- Score
- 100
- Total Time
- 5ms
- Peak Memory
- 812.0 KiB