摘要: 题意:跟POJ3281基本上一样的拆点网络流。建图:建一超级源点和一超级汇点,源点与食物相连,边权为其数量,汇点与饮料相连,边权也为其数量,把人分成两个点,之间的边权为1。每个人与之需要的食物和饮料相连,边权为1。代码(SAP模板): 1 #include <algorithm> 2 #include <iostream> 3 #include <cstring> 4 #include <cstdio> 5 #include <queue> 6 using namespace std; 7 const int maxn=101050; 阅读全文
posted @ 2012-09-26 12:00 pony1993 阅读(353) 评论(0) 推荐(0) 编辑

View My Stats