# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1046716 | mariaclara | Counting Mushrooms (IOI20_mushrooms) | C++17 | 71 ms | 432 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;
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define mk make_pair
#define pb push_back
#define fr first
#define sc second
int count_mushrooms(int n) {
int ans = n;
for(int i = 1; i < n; i+=2) {
vector<int> q;
q.pb(i);
q.pb(0);
if(i+1 < n) q.pb(i+1);
ans -= use_machine(q);
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |