摘要: 题意:题解:今天又遇到这个类型的建图题,有没有做出来。于是今天总结一下这个题的模型——顶点覆盖(每个顶点恰好覆盖一次)。先不考虑赋初值的费用:考虑赋初值:具体做法请参考:http://www.cnblogs.com/proverbs/archive/2013/01/06/2848043.html尽管不是一道题目,但是其实思想是一样的,赋初值=瞬移View Code 1 #include <iostream> 2 #include <cstring> 3 #include <cstdio> 4 #include <cstdlib> 5 6 #def 阅读全文
posted @ 2013-01-12 18:08 proverbs 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 以:BZOJ1927: [Sdoi2010]星际竞速 为例以前我写的:注意updata()函数View Code 1 #include <iostream> 2 #include <algorithm> 3 #include <cstring> 4 #include <cstdio> 5 #include <cstdlib> 6 7 #define N 10000 8 #define M 1000000 9 10 using namespace std;11 12 int head[N],next[M],to[M],pr[M],len 阅读全文
posted @ 2013-01-12 15:46 proverbs 阅读(190) 评论(0) 推荐(0) 编辑