/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 532.0 KiB
#2 Accepted 1ms 532.0 KiB
#3 Time Exceeded ≥1100ms ≥540.0 KiB
#4 Accepted 4ms 532.0 KiB
#5 Accepted 26ms 764.0 KiB

Code

#include <bits/stdc++.h>
using namespace std;
int main()
{
    int t;
    cin >> t;
    for (int i = 0; i < t; i++)
    {
        int x, mod;
        cin >> x;
        mod = x;
        string clrs = "RGB";
        for (int i = 1; i <= x; i++)
        {
            if (i % 2 != 0)
            {
                char tmp = clrs[0];
                clrs[0] = clrs[1];
                clrs[1] = tmp;
            }
            else
            {
                char tmp = clrs[1];
                clrs[1] = clrs[2];
                clrs[2] = tmp;
            }
        }

        cout << clrs << endl;
    }
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1010 Red Green Blue
Contest
Brain booster - 1
Language
C++20 (G++ 13.2.0)
Submit At
2023-12-31 15:37:40
Judged At
2024-11-11 03:45:31
Judged By
Score
80
Total Time
≥1100ms
Peak Memory
≥764.0 KiB