제출 #819764

#제출 시각아이디문제언어결과실행 시간메모리
819764benjaminkleyn버섯 세기 (IOI20_mushrooms)C++17
10 / 100
224 ms300 KiB
#include "mushrooms.h"
#include <bits/stdc++.h>
using namespace std;

int count_mushrooms(int n)
{
    int cnt = 0;
    bool A = true;
    for (int i = 0; i + 1 < n; i++)
    {
        cnt += A;
        A ^= use_machine({i, i + 1});
    }
    return cnt + A;
}
#Verdict Execution timeMemoryGrader output
Fetching results...