# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1035188 | Gray | Counting Mushrooms (IOI20_mushrooms) | C++17 | 77 ms | 596 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"
#define ff first
#define ss second
#define ll long long
#define ln "\n"
using namespace std;
int count_mushrooms(int n) {
std::vector<int> query;
int ans=1;
for (ll i=1; i<n; i+=2){
if (i+1<n){
query = {int(i), 0, int(i+1)};
ans+=2-use_machine(query);
}else{
query = {(int)i, 0};
ans+=1-use_machine(query);
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |