제출 #977479

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

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