摘要: 状态压缩。。。 按位与 & and 全一则一 (bitwise AND) 否则为零 按位或 | or 有一则一 (bitwise OR) 否则为零 按位取反 ~ not 是零则一 (bitwise NOT) 是一则零 按位异或 ^ xor 不同则一 (bitwise XOR) ... 阅读全文
posted @ 2012-08-06 20:14 Naix_x 阅读(131) 评论(0) 推荐(0) 编辑
摘要: 题目链接今天做了好几个模版最小生成树。。。贴一个kurskral. 1 /* 2 HDU 1301 Jungle Roads 3 最小生成树Kurskal模版 4 */ 5 #include <stdio.h> 6 #include <string.h> 7 #include <stdlib.h> 8 int num,sum; 9 int o[101];10 struct edge11 {12 int sv;13 int ev;14 int w;15 } p[5000];16 int cmp(const void *a,const void *b)17 {1 阅读全文
posted @ 2012-08-06 14:25 Naix_x 阅读(161) 评论(0) 推荐(0) 编辑