Submission #307742

#TimeUsernameProblemLanguageResultExecution timeMemory
307742CodePlatinaCounting Mushrooms (IOI20_mushrooms)C++14
25 / 100
133 ms384 KiB
#include "mushrooms.h"

using namespace std;

int count_mushrooms(int n)
{
    int ret = 1;
	for(int i = 1; i < n; i += 2)
    {
        if(i == n - 1) ret += 1 - use_machine({0, i});
        else ret += 2 - use_machine({i, 0, i + 1});
    }
    return ret;
}
#Verdict Execution timeMemoryGrader output
Fetching results...