![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
网络流
Kirigaya__Kazuto
这个作者很懒,什么都没留下…
展开
-
HDU 3605 Escape
题意:有n个人要移居m个星球,给出每个合适的星球,每个星球最多能容纳的人数,问是否所有人都可以移居。(1≤N≤105,1≤M≤10) 很明显这里的边有超过1e6条,所以我能直接跑,然后你会发现什么星球竟然只有10个,那么根据鸽巢原理我能不能想到,会有很多很多的人的选择是重复的,不重复的选择最多有2^10种,所以我们选择用二进制判重加缩点的方式来减少边的数量,然后就是跑最大流就可以了。 #原创 2017-08-18 11:29:56 · 230 阅读 · 0 评论 -
N - Marriage Match II HDU - 3081
Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we are kids. What a happy time as so man原创 2017-08-18 21:18:59 · 248 阅读 · 0 评论 -
POJ3281Dining(最大流入门题)
AC代码,题解后期补#include #include #include #include #include #include #include using namespace std; typedef long long LL; const int INF = 0x3f3f3f3f; const int max_m = 1e6+1000; const int max_n = 400原创 2017-08-15 11:05:49 · 272 阅读 · 0 评论