Submission #1294804

#TimeUsernameProblemLanguageResultExecution timeMemory
1294804lucasdmyCounting Mushrooms (IOI20_mushrooms)C++20
25 / 100
38 ms408 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; int count_mushrooms(int n){ int resp=0; for(int k=1;k<n-1;k+=2){ resp+=2-use_machine({k, 0, k+1}); } if(n%2==0){ resp+=1-use_machine({0, n-1}); } return 1+resp; }
#Verdict Execution timeMemoryGrader output
Fetching results...