摘要: 此题的本质问题就是对无向图的着色,使颜色使用最少的问题#include <stdio.h>#define maxn 27typedef struct Node{ int next[maxn]; int tot;}node;int main(){ int n; while(scanf("%d",&n)&&n!=0) { getchar();//吸收回车 node map[maxn]; int i,j,k; for(i=0;i<n;i++)//建图 { map[i].tot=0; getchar();//吸收每行的首字母,因为是字典序输 阅读全文
posted @ 2012-07-01 11:30 lishimin_come 阅读(128) 评论(0) 推荐(0) 编辑