
网络流
文章平均质量分 82
Kirigaya__Kazuto
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
HDU 3605 Escape
题意:有n个人要移居m个星球,给出每个合适的星球,每个星球最多能容纳的人数,问是否所有人都可以移居。(1≤N≤105,1≤M≤10) 很明显这里的边有超过1e6条,所以我能直接跑,然后你会发现什么星球竟然只有10个,那么根据鸽巢原理我能不能想到,会有很多很多的人的选择是重复的,不重复的选择最多有2^10种,所以我们选择用二进制判重加缩点的方式来减少边的数量,然后就是跑最大流就可以了。 #原创 2017-08-18 11:29:56 · 281 阅读 · 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 · 300 阅读 · 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 · 309 阅读 · 0 评论