# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1052170 | MercubytheFirst | Counting Mushrooms (IOI20_mushrooms) | C++17 | 119 ms | 952 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;
using ll = long long;
constexpr int block = 500;
int count_mushrooms(int n) {
vector<vector<int> > g(2);
g[0].push_back(0);
int cur = 1;
// while(max(g[0].size(), g[1].size()) < block and cur < n) {
// g[use_machine({0, cur})].push_back(cur);
// cur++;
// }
// const int b = (g[0].size() >= g[1].size() ? 0 : 1);
while(cur < n) {
g[use_machine({0, cur})].push_back(cur);
cur++;
}
return g[0].size();
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |