/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Wrong Answer 5ms 540.0 KiB
#3 Wrong Answer 5ms 540.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];
            }
        }
        int b=unique(a.begin(),a.end())-a.begin();

        if(b == 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:19:58
Judged At
2024-12-09 09:19:58
Judged By
Score
10
Total Time
5ms
Peak Memory
540.0 KiB