Submission #1080048

#TimeUsernameProblemLanguageResultExecution timeMemory
1080048Muhammad_AneeqCounting Mushrooms (IOI20_mushrooms)C++17
25 / 100
79 ms596 KiB
#include <vector> using namespace std; int use_machine(vector<int> x); int count_mushrooms(int n) { int ans=1; for (int i=1;i+1<n;i+=2) { vector<int>g={i,0,i+1}; ans+=2-use_machine(g); } if (n%2==0) ans+=1-use_machine({0,n-1}); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...