# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
436470 | frodakcin | Counting Mushrooms (IOI20_mushrooms) | C++17 | 184 ms | 292 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"
int count_mushrooms(int n)
{
std::vector<int> m;
int ans=1;
for(int i=1;i<n;i+=2)
{
int v=1;
m.push_back(i);
m.push_back(0);
if(i+1<n)
m.push_back(i+1), ++v;
ans += v-use_machine(m);
m.clear();
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |