제출 #978953

#제출 시각아이디문제언어결과실행 시간메모리
978953SiliconSquared버섯 세기 (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;
}
#결과 실행 시간메모리채점기 출력
결과를 불러오는 중입니다…