当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6214:Smallest Minimum Cut

题目描述
Consider a network $G=(V,E)$ with source $s$ and sink $t$. An s-t cut is a partition of nodes set $V$ into two parts such that $s$ and $t$ belong to different parts. The cut set is the subset of $E$ with all edges connecting nodes in different parts. A minimum cut is the one whose cut set has the minimum summation of capacities. The size of a cut is the number of edges in the cut set. Please calculate the smallest size of all minimum cuts.
输入解释
The input contains several test cases and the first line is the total number of cases $T~(1\le T\le 300)$.
Each case describes a network $G$, and the first line contains two integers $n~(2\le n\le 200)$ and $m~(0\le m\le 1000)$ indicating the sizes of nodes and edges. All nodes in the network are labelled from $1$ to $n$.
The second line contains two different integers $s$ and $t~(1\le s,t\le n)$ corresponding to the source and sink.
Each of the next $m$ lines contains three integers $u,v$ and $w~(1\le w\le 255)$ describing a directed edge from node $u$ to $v$ with capacity $w$.
输出解释
For each test case, output the smallest size of all minimum cuts in a line.
输入样例
2
4 5
1 4
1 2 3
1 3 1
2 3 1
2 4 1
3 4 2
4 5
1 4
1 2 3
1 3 1
2 3 1
2 4 1
3 4 3
输出样例
2
3
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6214

最后修改于 2020-10-25T23:29:22+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/2000MS(Java/Others) 65535/32768K(Java/Others)