/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 328.0 KiB
#2 Accepted 12ms 328.0 KiB
#3 Accepted 12ms 332.0 KiB
#4 Accepted 10ms 332.0 KiB
#5 Accepted 10ms 328.0 KiB
#6 Accepted 10ms 544.0 KiB
#7 Accepted 10ms 536.0 KiB
#8 Accepted 10ms 336.0 KiB

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