Submission #430475

#TimeUsernameProblemLanguageResultExecution timeMemory
430475alireza_kavianiCounting Mushrooms (IOI20_mushrooms)C++17
10 / 100
305 ms584 KiB
#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 timeMemoryGrader output
Fetching results...