/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 540.0 KiB
#2 Wrong Answer 8ms 440.0 KiB
#3 Wrong Answer 8ms 492.0 KiB

Code

#include<bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin >> t;
    while(t--){
        int n;
        cin>>n;
        char c;
        cin>>c;
        string s;
        getline(cin,s);
        s=s+c;
        string a;
        for (int i = 0; i < n; i++)
        {
            if((a.size() == 0) && (s[i] == 'S')){
                a+=s[i];
            } else if((a.size() == 1) && (s[i] == 'e')){
                a+=s[i];
            } else if((a.size() == 2) && (s[i] == 'r')){
                a+=s[i];
            } else if((a.size() == 3) && (s[i] == 'i')){
                a+=s[i];
            } else if((a.size() == 4) && (s[i] == 'o')){
                a+=s[i];
            } else if((a.size() == 5) && (s[i] == 'u')){
                a+=s[i];
            } else if((a.size() == 6) && (s[i] == 's')){
                a+=s[i];
            } else if((a.size() == 7) && (s[i] == 'O')){
                a+=s[i];
            } else if((a.size() == 8) && (s[i] == 'J')){
                a+=s[i];
            }
        }

        if(a.size() == 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 09:12:57
Judged At
2024-12-09 09:12:57
Judged By
Score
10
Total Time
8ms
Peak Memory
540.0 KiB