Submission #819764

#TimeUsernameProblemLanguageResultExecution timeMemory
819764benjaminkleynCounting Mushrooms (IOI20_mushrooms)C++17
10 / 100
224 ms300 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; int count_mushrooms(int n) { int cnt = 0; bool A = true; for (int i = 0; i + 1 < n; i++) { cnt += A; A ^= use_machine({i, i + 1}); } return cnt + A; }
#Verdict Execution timeMemoryGrader output
Fetching results...