摘要: inf开太小错了好久……下次还是要用0x7fffffff#include#include#include#include#includeusing namespace std;const int N=5024;const int inf=0x7fffffff;struct Edge{... 阅读全文
posted @ 2015-08-19 20:40 xryz 阅读(87) 评论(0) 推荐(0) 编辑
摘要: 输入的时候没有取反,一直ole。 这里也是用到拆点,将一个点拆成p和q,这两个之间连接两条路,一条cap=1和cost=矩阵上的值,另一条为cap=k和cost=0。在将0和2*n *n+1看成源点和汇点。#include#include#include#include#includ... 阅读全文
posted @ 2015-08-19 15:38 xryz 阅读(92) 评论(0) 推荐(0) 编辑