Submission #1292752

#TimeUsernameProblemLanguageResultExecution timeMemory
1292752ChuanChenCounting Mushrooms (IOI20_mushrooms)C++20
25 / 100
42 ms400 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; int ans = 1; int count_mushrooms(int n) { vector<int> m(3); m[1] = 0; for (int i = 1; i+1 < n; i+=2){ m[0] = i; m[2] = i+1; int verdic = use_machine(m); ans += 2-verdic; } if(n%2==0){ ans += 1-use_machine({0, n-1}); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...