Tag: problem: (D) Okabe and City Solution In C/C++

Codeforces Round #420 (Div. 2), problem: (D) Okabe and City Solution In C/C++

#include<iostream> #include<cstdio> #include<cstring> #include<queue> #include<cmath> using namespace std; const int maxn=1e4+5; const int inf=0x7f7f7f7f; int x,y,dis; bool vis; int k,n,m; int bfs() { queue<int>q; q.push(1); //memset //for(int i=1;i<=n;i++)dis=inf; memset(dis,0x7f,sizeof dis); dis=0; vis=true; while(!q.empty()) { int u; u=q.front();q.pop(); for(int i=1;i<=k;i++) { if(u==i)continue; int w=inf; int l1=abs(x-x); 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!