/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 2ms 540.0 KiB
#3 Accepted 2ms 540.0 KiB
#4 Accepted 2ms 576.0 KiB
#5 Accepted 1ms 540.0 KiB
#6 Accepted 1ms 540.0 KiB
#7 Accepted 2ms 796.0 KiB
#8 Accepted 2ms 748.0 KiB

Code

#include<bits/stdc++.h>
#define ll long long int
using namespace std;
int main()
{
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    int tc=1,tc1=1;
    cin>>tc;
    up:
    while(tc--){
      ll n;
      string s;
      cin>>n>>s;
      string t="SeriousOJ";
      ll c=0;
      for(auto i:s){
        if(i==t[c]){
          c++;
        }
        if(c==9){
          cout<<"YES\n";
          goto up;
        }
      }
      cout<<"NO\n";
    }
}

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:31:56
Judged At
2024-12-10 09:31:56
Judged By
Score
100
Total Time
2ms
Peak Memory
796.0 KiB