Tag: problem: (E) Ice cream coloring Solve In C/C++

Codeforces Round #411 (Div. 2), problem: (E) Ice cream coloring Solution In C/C++

#include<cstdio> #include<cstring> #include<cstdlib> #include<algorithm> #include<set> using namespace std; const int MX=600111; int n,m; int pool,*c,s; int hed,nxt,t,ec,vis,vism,no; set<int>cur; inline void ade(int u,int v){ ec++;nxt=hed;t=v;hed=ec; } void dfs(int k){ vis=1; for(int *i=c;i!=c;i++)if(vism)cur.erase(no); for(int *i=c;i!=c;i++)if(!vism){ no=*(cur.lower_bound(1)); cur.erase(no); vism=1; } for(int *i=c;i!=c;i++)cur.insert(no); for(int...

Want to stay up to date with the latest news?

We would love to hear from you! Please fill in your details and we will stay in touch. It's that simple!