摘要: 看了下题解。按长度排序,把长度相差一的,可以转移的连单向边。之后求最长路径。 阅读全文
posted @ 2013-05-29 14:41 hsuppr 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 一眼最小割。主要是高度差不超过d的处理。把(x, y, z) 和 (x - d, y + dir, z + dir) 连边即可,花一下图就理解了。/** * Problem:[HNOI2013]-D2P3 * Author:Shun Yao * Time:2013.5.29 * Result:Accepted * Memo:MaxFlow */#include <cstring>#include <cstdlib>#include <cstdio>const long Maxt = 65605, inf = 0x7f7f7f7f;long h[Maxt], 阅读全文
posted @ 2013-05-29 14:24 hsuppr 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 一看就是高斯消元。但没想到边的期望经过次数=点的期望 / 点的度数官方数据有误。我的代码在gcc (Ubuntu/Linaro 4.4.4-14ubuntu5) 4.4.5 下可以过。在 gcc 4.6.3 g++ Main.cc -o Main -Wall -lm --static -DONLINE_JUDGE 下可以过 (去掉-O2)/** * Problem:HNOI2013-d2p2 * Author:Shun Yao * Time:2013.5.28 * Result:Accepted * Memo:DP, greedy, guass */#include <cstring&g 阅读全文
posted @ 2013-05-29 14:21 hsuppr 阅读(362) 评论(0) 推荐(0) 编辑
摘要: 以上转自http://jiazhipeng.byethost7.com/archives/176 阅读全文
posted @ 2013-05-29 14:11 hsuppr 阅读(249) 评论(0) 推荐(0) 编辑