# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
346036 | poom2904 | Counting Mushrooms (IOI20_mushrooms) | C++14 | 0 ms | 364 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-1+(n&1);i+=2)
{
m={i,0,i+1};
ans+=2-use_machine(m);
}
if(n&1==0)
{
m={n-1,0};
ans+=1-use_machine(m);
}
return ans;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |