Time Exceeded
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-11-11 02:49:07
- Judged By
- Score
- 10
- Total Time
- ≥1041ms
- Peak Memory
- ≥540.0 KiB