Submission #978953

#TimeUsernameProblemLanguageResultExecution timeMemory
978953SiliconSquaredCounting Mushrooms (IOI20_mushrooms)C++14
10 / 100
129 ms596 KiB
#include "mushrooms.h"

int count_mushrooms(int n) {
    int z=1;
    bool f=true;
    for (int i=1;i<n;i++){
        if (use_machine({i-1,i})==1){
            f=!f;
        }
        if (f){z++;}
    }
    return z;
}
#Verdict Execution timeMemoryGrader output
Fetching results...