摘要: 很久没有一次a的感觉啦。关键是建模,建一个有b+2个点的网络流,s为0,t为b+1,1--b为各个棚。二分枚举答案。s到各棚的容量为当前可行区间内,可选择此棚的牛的个数,各棚到t的容量为割棚可容纳牛的个数。数据量不大,直接用的EK.#include <iostream> #include <cstdio> #include <queue> using namespace std; const int maxn=1001; const int maxe=25; const int inf=200000000; int n,b,tot,s,t; int flow 阅读全文
posted @ 2012-12-10 14:15 LJ_COME!!!!! 阅读(170) 评论(0) 推荐(0)