| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1292746 | kahoul | Counting Mushrooms (IOI20_mushrooms) | C++20 | 41 ms | 388 KiB |
#include "mushrooms.h"
using namespace std;
int count_mushrooms(int n) {
int resp = 1;
for (int i = 1; i + 1 < n; i += 2) {
vector<int> m = {i, 0, i + 1};
resp += 2 - use_machine(m);
}
if (n % 2 == 0) {
vector<int> m = { n -1, 0};
resp += 1 - use_machine(m);
}
return resp;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
