Codeforces Round #421 (Div. 1), problem: (E) Mister B and Flight to the Moon Solution In C/C++

By |2017-08-05T22:21:39+00:00August 5th, 2017|Categories: C/C++, Programming|Tags: , , , , , , , |

#include<cstdlib> #include<cstdio> #include<algorithm> using namespace std; const int N=301; const int M=100001; const int K=4; int a[M][K]; int f[N]; 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[k][0]=w; a[k][1]=x; a[k][2]=y; a[k][3]=z; } int main(){ scanf("%d",&n); if(n&1){ f[2]=f[3]=1; }else{ f[1]=3; f[2]=4; f[3]=1; f[4]=2; [...]