题目大意:给你一张无向图,每一个点的度数都是3. 你的任务是推断是否能把它分解成若干个爪(每条边仅仅能属于一个爪) 解题思路:二分图染色裸题.能够得出:爪的中心点和旁边的三个点的颜色是不一样的 #include <cstdio> #include <cstring> using namespace std; #define N 310 #define M 2010 struct Edge{ int to, Next; }E[M]; int head[N], color[N], to…
B. Claw Decomposition Time Limit: 1000ms Memory Limit: 131072KB 64-bit integer IO format: %lld Java class name: Main A claw is defined as a pointed curved nail on the end of each toe in birds, some reptiles, and some mammals. However, if you a…