제출 #336639

#제출 시각아이디문제언어결과실행 시간메모리
336639cheeheng버섯 세기 (IOI20_mushrooms)C++14
25 / 100
104 ms492 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; int count_mushrooms(int n) { int ans = 1; vector<int> m; for(int x = 1; x+1 < n; x += 2){ m = {x, 0, x+1}; int c = use_machine(m); ans += 2-c; } if(n%2 == 0){ m = {0, n-1}; int c = use_machine(m); ans += 1-c; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...