# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
336639 | cheeheng | Counting Mushrooms (IOI20_mushrooms) | C++14 | 104 ms | 492 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>
using namespace std;
int count_mushrooms(int n) {
int ans = 1;
vector<int> m;
for(int x = 1; x+1 < n; x += 2){
m = {x, 0, x+1};
int c = use_machine(m);
ans += 2-c;
}
if(n%2 == 0){
m = {0, n-1};
int c = use_machine(m);
ans += 1-c;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |