# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430470 | amoo_safar | Counting Mushrooms (IOI20_mushrooms) | C++17 | 1 ms | 200 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "mushrooms.h"
#include <bits/stdc++.h>
#define F first
#define S second
#define pb push_back
#define all(x) x.begin(), x.end()
using namespace std;
int count_mushrooms(int n) {
if(n == 2)
return 2 - use_machine({0, 1});
vector<int> A[2];
A[0].pb(0);
int res = use_machine({0, 1});
int x = 2;
if(res){
A[1].pb(1);
res = use_machine({0, 2});
x = 3;
if(res) A[1].pb(2);
else A[0].pb(2);
} else A[0].pb(1);
vector<int> rem;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |