# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
430477 | alireza_kaviani | Counting Mushrooms (IOI20_mushrooms) | C++17 | 180 ms | 296 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 += 2){
vector<int> v = {i , 0};
if(i + 1 < n) v.push_back(i + 1);
int x = use_machine(v); cntA += v.size() - 1 - x;
/*if(x == 0){
cntA++;
A.push_back(i);
}
if(x == 1){
cntB++;
B.push_back(i);
}*/
}
return cntA;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |