Submission #306239

#TimeUsernameProblemLanguageResultExecution timeMemory
306239qpwoeirutCounting Mushrooms (IOI20_mushrooms)C++17
25 / 100
129 ms384 KiB
#include "mushrooms.h" #include <bits/stdc++.h> int count_mushrooms(int n) { int ans = 1; int i=1; for (; i+1<n; i+=2) { int resp = use_machine({i, 0, i+1}); ans += 2 - resp; } if (i < n) { ans += 1 - use_machine({0, i}); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...