读题比做题难系列…… poj1087 输入n,代表插座个数,接下来分别输入n个插座,字母表示.把插座看做最大流源点,连接到一个点做最大源点,流量为1. 输入m,代表电器个数,接下来分别输入m个电器,字符串表示.把电器看做最大流终点,连接到一个点做最大汇点,流量为1. 输入k,代表转换器个数,接下来分别输入k个转换器,每个插座输入两个字母a,b表示a可以连在b上.把转换器看做流,b->a,因为转换器无限提供,流量为无限大 代码: #include <iostream> #include &…
题目链接:https://vjudge.net/problem/POJ-1459 Power Network Time Limit: 2000MS   Memory Limit: 32768K Total Submissions: 29270   Accepted: 15191 Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power t…
求从电站->调度站->消费者的最大流,给出一些边上的容量.和电站和消费者能够输入和输出的最大量. 加入一个超级源点和汇点,建边跑模板就能够了. 两个模板逗能够. #include <iostream> #include <cstring> #include <string> #include <cstdio> #include <cmath> #include <algorithm> #include <vector…
题目链接:https://vjudge.net/problem/POJ-1087 A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 17861   Accepted: 6172 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations In…
                                   A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 16083   Accepted: 5513 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet…
A Plug for UNIX 题目链接:https://vjudge.net/problem/POJ-1087 Description: You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an international mandate to make the free flow o…
Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power transport lines. A node u may be supplied with an amount s(u) >= 0 of power, may produce an amount 0 <= p(u) <= p max(u) of power, may co…
                                     Power Network Time Limit: 2000MS   Memory Limit: 32768K Total Submissions: 27229   Accepted: 14151 Description A power network consists of nodes (power stations, consumers and dispatchers) connected by power trans…
A Plug for UNIX Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 13855   Accepted: 4635 Description You are in charge of setting up the press room for the inaugural meeting of the United Nations Internet eXecutive (UNIX), which has an int…
原题链接 题意简述 原题看了好几遍才看懂- 给出一个个点,条边的有向图.个点中有个源点,个汇点,每个源点和汇点都有流出上限和流入上限.求最大流. 题解 建一个真 · 源点和一个真 · 汇点.真 · 源点向所有原源点连容量等于其上限的边,所有原汇点向真 · 汇点连容量等于其上限的边.跑一遍最大流即可. Code //Power Network #include <cstdio> #include <cstring> #include <algorithm> using n…