/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 332.0 KiB
#2 Time Exceeded ≥1085ms ≥556.0 KiB
#3 Time Exceeded ≥1098ms ≥512.0 KiB
#4 Time Exceeded ≥1092ms ≥496.0 KiB

Code

// Problem Solver: Mushfiq R.
#include <iostream>
using namespace std;
#define ll long long
#define ld long double
#define vsort(v) sort(v.begin(), v.end())

int minOperation(int n)
{
    if (n <= 0)
    {
        return 0;
    }
    return 1 + min(minOperation(n - 2), minOperation(n - 3));
}

int main()
{
    int n;
    cin >> n;
    int echo = minOperation(n);
    cout << echo << endl;

    return 0;
}

Information

Submit By
Type
Submission
Problem
P1106 too easy or three easy
Contest
Brain Booster #6
Language
C++17 (G++ 13.2.0)
Submit At
2024-10-03 16:10:51
Judged At
2024-10-03 16:10:51
Judged By
Score
10
Total Time
≥1098ms
Peak Memory
≥556.0 KiB