Submission #1319392

#TimeUsernameProblemLanguageResultExecution timeMemory
1319392SmuggingSpunCounting Mushrooms (IOI20_mushrooms)C++20
25 / 100
40 ms400 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; int count_mushrooms(int n){ n--; int ans = 1; while(n > 1){ ans += 2 - use_machine({n, 0, n - 1}); n -= 2; } if(n == 1){ ans += 1 - use_machine({0, 1}); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...