/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 2ms 484.0 KiB
#2 Accepted 2ms 768.0 KiB
#3 Accepted 2ms 512.0 KiB
#4 Accepted 2ms 796.0 KiB
#5 Accepted 2ms 492.0 KiB
#6 Accepted 2ms 816.0 KiB
#7 Accepted 3ms 588.0 KiB
#8 Accepted 2ms 688.0 KiB

Code

#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define yes cout << "YES" << "\n";
#define no cout << "NO" << "\n";
#define fri(a,b) for(ll i = a; i<b; i++) 
#define frj(a,b) for(ll j = a; j <b; j++)
#define frk(a,b) for(ll k = a; k <b; k++) 
#define rfri(a,b) for(ll i = a; i>=b; i--)

using namespace std;
int main()
{
    ios_base:: sync_with_stdio(false);
    cin.tie(NULL);

    ll T = 1;
    cin >> T;
    while(T--)
    {
      ll n;
      cin >> n;
      string s;
      cin >> s;
      string s1 = "SeriousOJ";
      ll j = 0;
      fri(0,n)
      {
        if(s[i] == s1[j])
        {
            j++;
        }
      }
      if(j==9) yes
      else no
    }
}

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 04:55:57
Judged At
2024-12-09 04:55:57
Judged By
Score
100
Total Time
3ms
Peak Memory
816.0 KiB