CSU-ACM2017暑假集训比赛7 - D - Bicoloring - UVA - 10004
D-Bicoloring一边深度优先搜索,一边染色,一边检查是否有相邻节点染上了相同颜色即可。也可以理解为染色法判断二分图是否成立。#include#include#include#include#include#includeusingnamespacestd;constintmaxn=204;intN,L,cnt;vectorg[maxn];structnode{intcolor;boolvi