제출 #306583

#제출 시각아이디문제언어결과실행 시간메모리
306583chubyxdxdCounting Mushrooms (IOI20_mushrooms)C++17
0 / 100
0 ms256 KiB
#include "mushrooms.h" #include <bits/stdc++.h> #define pb push_back using namespace std; int count_mushrooms(int n){ int ans=1; vector<int> m; m.push_back(0); m.push_back(n-1); int f=use_machine(m); if(f==0)ans++; for(int i=1;i<=n/2-1;i++){ m.clear(); m.pb(i); m.pb(0); m.pb(n-i); int f=use_machine(m); if(f==0)ans+=2; if(f==1)ans+=1; } if(n%2==1){ m.clear(); m.pb(0); m.pb(n/2); int f=use_machine(m); if(f==1)ans++; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...