算法分析与设计-作业12-图的着色问题
问题图的m着色问题。给定无向连通图G和m种颜色,用这些颜色给图的顶点着色,每个顶点一种颜色。如果要求G的每条边的两个顶点着不同颜色。给出所有可能的着色方案;如果不存在,则回答“NO”。解析分析最坏时间复杂度: O(n*m^n)4. 设计#include<bits/stdc++.h>using namespace std;int n, m,a = 1, b = 1,cnt;int graph[20][20],color[20];bool check(int..





