제출 #346105

#제출 시각아이디문제언어결과실행 시간메모리
346105poom2904버섯 세기 (IOI20_mushrooms)C++17
0 / 100
2 ms384 KiB
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;
int cnt_A = 1,cnt_B = 0;
vector<int> A = {0},B;
int count_mushrooms(int n) {
    int i=1;
    if(n<=227)
    {
        while(i<n)
        {
            vector<int> vec = {0,i};
            if(use_machine(vec))cnt_B++;
            else cnt_A++;
            i++;
        }
        return cnt_A;
    }
	/*while(max(cnt_A,cnt_B)<2)
    {
        vector<int> vec = {0,i};
        if(use_machine(vec))
        {
            cnt_B++;
            B.push_back(i);
        }
        else
        {
            cnt_A++;
            A.push_back(i);
        }
        i++;
    }
    while(min(cnt_A,cnt_B)<2 && max(cnt_A,cnt_B)<3)
    {
        bool is_swapped = false;
        if(cnt_A<2)
        {
            swap(cnt_A,cnt_B);
            swap(A,B);
            is_swapped = true;
        }
        vector<int> vec = {i,A[0],i+1,A[1]};
        int res = use_machine(vec);
        
    }*/
	return cnt_A;
}

#Verdict Execution timeMemoryGrader output
Fetching results...