/ SeriousOJ /

Record Detail

Accepted


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 540.0 KiB
#2 Accepted 2ms 584.0 KiB
#3 Accepted 3ms 540.0 KiB
#4 Accepted 1ms 772.0 KiB
#5 Accepted 2ms 816.0 KiB
#6 Accepted 1ms 540.0 KiB
#7 Accepted 2ms 540.0 KiB
#8 Accepted 2ms 748.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
#define int long long int
const int N = 1e5 + 10;
// int a[N];

main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    int t;
    cin >> t;
    const string target = "SeriousOJ";
    while (t--)
    {
        int n, flag = 0;
        cin >> n;
        string s;
        cin >> s;
        int i = 0, j = 0;

        while (i < 9 && j < s.length())
        {
            if (s[j] == target[i])
            {
                i++;
            }
            j++;
        }
        if (i == 9)
            cout << "YES" << endl;
        else
            cout << "NO" << endl;
    }
}

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