# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
632589 | Green55 | Counting Mushrooms (IOI20_mushrooms) | C++17 | 106 ms | 300 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 long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
#define xx first
#define yy second
#define all(v) (v).begin(), (v).end()
#define query use_machine
int n;
int count_mushrooms(int _n) {
n = _n;
int ret = 1;
for(int i=1; i<n; i+=2) {
if(i+1 == n) {
ret += 1 - query({0, n-1});
break;
}
ret += 2 - query({i, 0, i+1});
}
return ret;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |