# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432242 | lakshith_ | Counting Mushrooms (IOI20_mushrooms) | C++14 | 107 ms | 328 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;
int i;
for(i=1;i<n-1;i+=2){
int r = use_machine((vector<int>){i,0,i+1});
if(r==1)ans++;
else if(r==0)ans+=2;
}
if(i==n-1){
int r = use_machine((vector<int>){0,i});
if(r==0)ans++;
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |