# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
346217 | SecretK | 버섯 세기 (IOI20_mushrooms) | C++14 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "mushrooms.h"
int count_mushrooms(int n) {
std::vector<int> m;
bool a = 0;
int ans = 1;
for (int i = 0; i < n; i++){
if(use_machine(i,i+1) == 1){
if(a) a = 0;
else a = 1;
}
if(!a) ans++;
}
return ans;
}