/* Sample solution to teamtournament problem in NCPC2018 by Andreas Björklund Naive implementation of Misra and Gries 1992 edge-coloring algorithm. */ #include #define MAXNM (1000) int n, m; int adj[MAXNM][MAXNM]; int freecol(int x) { int i; int col[MAXNM]; for (i=0;i0) { recol(i,j); } int matches=n*(m-1)*n*m/2; for (k=1;k