제출 #588927

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