Submission #434238

#TimeUsernameProblemLanguageResultExecution timeMemory
434238KanaifuCounting Mushrooms (IOI20_mushrooms)C++14
10 / 100
268 ms484 KiB
#include <bits/stdc++.h>
#include "mushrooms.h"
//#include "stub.cpp"

using namespace std;
#define pb push_back

int count_mushrooms(int n)
{
    bool ident[200001];
    ident[0] = false;
	vector <int> mush;
	mush.pb(0);
	for (int i=1; i<n; i++)
    {
        mush.pb(i);
        int numb = use_machine(mush);
        ident[i] = numb;
        mush.pop_back();
    }
    int brojac =0;
    for (int i=0; i<n; i++)
    {
        if (ident[i]==0)
        {
            brojac++;
        }
    }
    return brojac;
}
#Verdict Execution timeMemoryGrader output
Fetching results...