MDeath-Kid

- M I T & Y
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

2011年6月8日

摘要: 图的着色问题,转换为最大团问题,只有黑色不相邻就行。1419void clique(int n, int* u, int mat[][MAXN], int size, int& max, int& bb, int* res, int* rr, int* c) { int i, j, vn, v[MAXN]; if (n) { if (size + c[u[0]] <= max) return; for (i = 0; i < n + size - max && i < n; ++ i) { for (j = i + 1, vn = 0; j & 阅读全文

posted @ 2011-06-08 17:24 MDeath-Kid 阅读(255) 评论(0) 推荐(0) 编辑

摘要: 相邻定点不能为一种频道,转化为图定点的着色问题。1129/*8737793 MDK 1129 Accepted 692K 0MS G++ 1858B 2011-06-08 09:40:42 */#include<stdio.h>#include<iostream>#include<limits.h>#include<string.h>#include<math.h>#include<time.h>#include<vector>#include<list>#include<algorithm& 阅读全文

posted @ 2011-06-08 09:42 MDeath-Kid 阅读(221) 评论(0) 推荐(0) 编辑