# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
838566 | ma_moutahid | Counting Mushrooms (IOI20_mushrooms) | C++17 | 147 ms | 384 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"
using namespace std;
#define vi vector<int>
int count_mushrooms(int n) {
int type=1;
int result=1;
for(int i=0;i<n-1;i++){
int count=use_machine(vi({i,i+1}));
if(count){
type=!type;
}
result+=type;
}
return result;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |