Codeforces Round #421 (Div. 1), problem: (E) Mister B and Flight to the Moon Solution In C/C++
#include<cstdlib> #include<cstdio> #include<algorithm> using namespace std; const int N=301; const int M=100001; const int K=4; int a; int f; int n,m,i,j,k,x,y,t,u,v; void make(int &k,int w,int x,int y,int z){ k++; a=w; a=x; a=y; a=z; } int …