Submission #588327

#TimeUsernameProblemLanguageResultExecution timeMemory
588327supercatexCounting Mushrooms (IOI20_mushrooms)C++14
25 / 100
112 ms324 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; int count_mushrooms(int n) { vector<int> a, b; a.push_back(0); int res = 1; int i = 1; while (i < n) { if (i + 1 < n) res += 2 - use_machine(vector<int>{i, 0, i + 1}); else res += 1 - use_machine(vector<int>{i, 0}); i += 2; } return res; }
#Verdict Execution timeMemoryGrader output
Fetching results...