意甲冠军 中国 依据Havel-Hakimi定理构图即可咯 先把顶点按度数从大到小排序 可图的话 度数大的顶点与它后面的度数个顶点相连肯定是满足的 出现了-1就说明不可图了 #include<cstdio> #include<cstring> #include<algorithm> using namespace std; const int N = 20; int mat[N][N], ord[N]; bool cmp(int i, int j) { ret…
Necklace of Beads Description Beads of red, blue or green colors are connected together into a circular necklace of n beads ( n < 24 ). If the repetitions that are produced by rotation around the center of the circular necklace or reflection to the a…