제출 #1052170

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

constexpr int block = 500;
int count_mushrooms(int n) {
	vector<vector<int> > g(2);
	g[0].push_back(0);
	int cur = 1;
	// while(max(g[0].size(), g[1].size()) < block and cur < n) {
	// 	g[use_machine({0, cur})].push_back(cur);
	// 	cur++;
	// }
	// const int b = (g[0].size() >= g[1].size() ? 0 : 1);
	while(cur < n) {
		g[use_machine({0, cur})].push_back(cur);
		cur++;
	}
	return g[0].size();
}
#Verdict Execution timeMemoryGrader output
Fetching results...