# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
951720 | Trisanu_Das | Counting Mushrooms (IOI20_mushrooms) | C++17 | 69 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"
#include <bits/stdc++.h>
#define all(x) x.begin(), x.end()
#define chmin(x, v) x = min(x, v)
#define chmax(x, v) x = max(x, v)
#define pb push_back
#define pii pair<int, int>
#define sz(x) (int)x.size()
#define x first
#define y second;
//#define int long long
using namespace std;
int count_mushrooms(int n) {
int nb = 0;
for (int i = 1; i < n; i += 2){
vector<int> query = {i, 0};
if (i + 1 < n)
query.pb(i + 1);
nb += use_machine(query);
}
return n - nb;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |