# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
432718 | MOUF_MAHMALAT | Counting Mushrooms (IOI20_mushrooms) | C++14 | 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>
using namespace std;
typedef int ll;
ll ans=1,x;
int count_mushrooms(int n)
{
for(ll i=1;i<n;i+=2)
{
x=use_machine({i,0,i+1});
if(x==0)
ans+=2;
else if(x==1)
ans++;
}
if(n%2==0)
ans+=1^use_machine({0,n-1});
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |