제출 #346055

#제출 시각아이디문제언어결과실행 시간메모리
346055athensclub버섯 세기 (IOI20_mushrooms)C++14
0 / 100
0 ms364 KiB
#include "mushrooms.h" #include <vector> int div2RoundUp(int x) { int d = x / 2; if (d * 2 < x) return d + 1; return d; } int count_mushrooms(int n) { std::vector<int> m; for (int i = 0; i < n; i++) m.push_back(i); int c1 = use_machine(m); m = {0, 1}; int c2 = use_machine(m); return c2 == 1 ? div2RoundUp(c1) : n - div2RoundUp(c1); }
#Verdict Execution timeMemoryGrader output
Fetching results...