Submission #750226

#TimeUsernameProblemLanguageResultExecution timeMemory
750226mohav48173Counting Mushrooms (IOI20_mushrooms)C++14
25 / 100
113 ms304 KiB
#include "mushrooms.h" #include<bits/stdc++.h> using namespace std; int count_mushrooms(int n) { vector<int>x; int cnt=1; for(int i=2;i<n;i+=2) { cnt+=2-use_machine({i,0,i-1}); } if((n-1)%2) { cnt+=1-use_machine({0,n-1}); } return cnt; }
#Verdict Execution timeMemoryGrader output
Fetching results...