제출 #615451

#제출 시각아이디문제언어결과실행 시간메모리
615451Koosha_mv버섯 세기 (IOI20_mushrooms)C++14
10 / 100
333 ms256 KiB
#include "mushrooms.h" #include <bits/stdc++.h> using namespace std; #define dbgv(v) cout<<#v<<" = "; f(i,0,int(v.size())) cout<<v[i]<<" "; cout<<endl #define dbga(a,x,y) cout<<#a<<" = "; f(i,x,y) cout<<a[i]<<" "; cout<<endl #define erorp(x) cout<<#x<<"={"<<x.F<<" , "<<x.S<<"}"<<endl #define eror(x) cout<<#x<<'='<<(x)<<endl #define f_(i,a,b) for(int i=a;i>=b;i--) #define f(i,a,b) for(int i=a;i<b;i++) #define nb(x) __builtin_popcount(x) #define all(v) v.begin(),v.end() #define bit(n,k) (((n)>>(k))&1) #define Add(x,y) x=(x+y)%mod #define maxm(a,b) a=max(a,b) #define minm(a,b) a=min(a,b) #define lst(x) x[x.size()-1] #define sz(x) int(x.size()) #define mp make_pair #define ll long long #define pb push_back #define S second #define F first int count_mushrooms(int n) { int now=0,ans=0; while(1){ int nxt=-1; ans++; f(i,now+1,n){ vector<int> vec; vec.pb(now); vec.pb(i); //dbgv(vec); if(use_machine(vec)==0){ nxt=i; break ; } } if(nxt==-1) break ; now=nxt; } //eror(ans); return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...