Submission #436470

#TimeUsernameProblemLanguageResultExecution timeMemory
436470frodakcinCounting Mushrooms (IOI20_mushrooms)C++17
25 / 100
184 ms292 KiB
#include "mushrooms.h" int count_mushrooms(int n) { std::vector<int> m; int ans=1; for(int i=1;i<n;i+=2) { int v=1; m.push_back(i); m.push_back(0); if(i+1<n) m.push_back(i+1), ++v; ans += v-use_machine(m); m.clear(); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...