제출 #436470

#제출 시각아이디문제언어결과실행 시간메모리
436470frodakcin버섯 세기 (IOI20_mushrooms)C++17
25 / 100
184 ms292 KiB
#include "mushrooms.h" int count_mushrooms(int n) { std::vector<int> m; int ans=1; for(int i=1;i<n;i+=2) { int v=1; m.push_back(i); m.push_back(0); if(i+1<n) m.push_back(i+1), ++v; ans += v-use_machine(m); m.clear(); } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...