摘要:
题目链接: 题意:给出一副图,然后每条边的权值!然后问s到t的最小割 solve:直接建图然后跑最大流就行了 #include <bits/stdc++.h> using namespace std; #define ll long long #define re register const in 阅读全文
随笔分类 - 网络流
魔术球问题
2019-06-18 14:49 by 一只弱鸡丶, 323 阅读, 收藏,
摘要:
传送门: 题解区的玄学公式:球的个数:(n*(n+2)+(n&1)-2)/2 既然能直接求出球的个数那么就会有贪心法emmm 但是作为一道网络流24题的题目,我觉得应该要用网络流的方法写才能锻炼自己,如果对最大流模板熟悉,那么这道题的难点只是建图。 这题只要把一个点分割成两个点,然后建图就ok了 阅读全文
【模板】网络最大流
2019-06-17 23:42 by 一只弱鸡丶, 216 阅读, 收藏,
摘要:
传送门: #include <cstdlib> #include <cstdio> #include <algorithm> #include <iostream> #include <cstring> #include <queue> #include <cmath> using namespac 阅读全文
浙公网安备 33010602011771号