# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430475 | alireza_kaviani | Counting Mushrooms (IOI20_mushrooms) | C++17 | 305 ms | 584 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"
#include <bits/stdc++.h>
using namespace std;
const int SQ = 101;
int count_mushrooms(int n) {
vector<int> A = {0} , B;
int cntA = 1 , cntB = 0;
for (int i = 1 ; i < n ; i++){
vector<int> v = {0 , i};
int x = use_machine(v);
if(x == 0){
cntA++;
A.push_back(i);
}
if(x == 1){
cntB++;
B.push_back(i);
}
}
return cntA;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |