# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
421822 | Mohammed_Atalah | Counting Mushrooms (IOI20_mushrooms) | C++17 | 264 ms | 552 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;
int count_mushrooms(int n) {
vector<int> indices;
for (int i = 0; i < n; i++) {
indices.push_back(i);
}
if (use_machine(indices) == 0) {
return n;
}
int bs = 0;
for (int i = 1; i < n; i++) {
std::vector<int> v;
v.push_back(0);
v.push_back(i);
if (use_machine(v) == 1) {
bs++;
}
}
return n - bs;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |