
ZOJ
文章平均质量分 85
阿阿阿阿_欢
勿忘初心
展开
-
POJ 1325 && ZOJ 1364--Machine Schedule【二分图 && 最小点覆盖数】
由题意可知,本意要求的是二分图的最小点覆盖集问题,即最小的顶点集合,“覆盖”所有的边,可以转化成二分图的最大匹配问题。 二分图的最小点覆盖数 == 最大匹配数。原创 2015-08-24 10:02:28 · 1050 阅读 · 0 评论 -
ZOJ 3362--Beer Problem【最大费用最大流 && 有值得注意的地方】
题意:有N个城市以及连接这些城市的M条无向边,其中城市1是啤酒产地。给出N-1个数字,分别表示每个城市里啤酒每桶的价格(城市1不算),我们可以认为这N-1个城市对啤酒的需求是没有限制的即 无限大。已知每条无向边最多可以运送啤酒的桶数 和运送每桶的花销,问你从城市1出发卖啤酒可以得到的最大收益。解析:算是比较好像的费用流了,但要注意。每次SPFA找到可以从源点到汇点的最长路后,我原创 2015-09-17 21:27:24 · 496 阅读 · 0 评论 -
ZOJ 3640--Missile【二分查找 && 最大流dinic && 经典建图】
MissileTime Limit: 2 Seconds Memory Limit: 65536 KB You control N missile launching towers. Every tower has enough missiles, but for each tower only one missile can be launch at the s原创 2015-08-07 10:11:11 · 754 阅读 · 1 评论 -
POJ 1459 && ZOJ 1734--Power Network【最大流dinic】
Power NetworkTime Limit: 2000MS Memory Limit: 32768KTotal Submissions: 25108 Accepted: 13077DescriptionA power network consists of nodes (power stations, consum原创 2015-08-06 11:04:11 · 609 阅读 · 0 评论 -
ZOJ 2588--Burning Bridges【无向图边双联通 && 输出桥的编号】
Burning BridgesTime Limit: 5 Seconds Memory Limit: 32768 KB Ferry Kingdom is a nice little country located on N islands that are connected by M bridges. All bridges are very beautiful原创 2015-08-15 18:58:58 · 779 阅读 · 0 评论 -
ZOJ 3885--The Exchange of Items【最小费用最大流 && 建图】
The Exchange of ItemsTime Limit: 2 Seconds Memory Limit: 65536 KB Bob lives in an ancient village, where transactions are done by one item exchange with another. Bob is very clever an原创 2015-08-29 00:23:18 · 1622 阅读 · 0 评论 -
POJ 1422 && ZOJ 1525 --Air Raid【二分图 && 最小路径覆盖】
Air RaidTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7451 Accepted: 4434DescriptionConsider a town where all the streets are one-way and each stree原创 2015-08-25 21:03:33 · 734 阅读 · 0 评论 -
POJ 1466 && ZOJ 1137--Girls and Boys【二分图 && 最大点独立集】
Girls and BoysTime Limit: 5000MS Memory Limit: 10000KTotal Submissions: 11134 Accepted: 4981DescriptionIn the second year of the university somebody started a s原创 2015-08-25 20:36:48 · 844 阅读 · 0 评论 -
ZOJ 2760--How Many Shortest Path【dinic最大流 && 最短路构图 && 求最短路径的条数】
How Many Shortest PathTime Limit: 10 Seconds Memory Limit: 32768 KB Given a weighted directed graph, we define the shortest path as the path who has the smallest length among all the原创 2015-08-11 18:46:54 · 746 阅读 · 0 评论 -
POJ1287 && ZOJ 1372--Networking【水题 && kruskal】
NetworkingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7259 Accepted: 3941DescriptionYou are assigned to design network connections between certain原创 2015-08-10 18:14:08 · 440 阅读 · 0 评论 -
POJ 1861 && ZOJ 1542--Network 【最小生成树 && kruscal && 水题】
题目大意:给n个点,m条边。求一棵生成树,并且满足任意两点之间的距离的最大值最小。输出这个最大值,然后输出树的边的数量,最后输出树的每条边。题目思路:对于一个生成树来说,它的最大边满足在所有的生成树的最大边里最小,这其实就是一颗最小生成树。#include #include #include #include #define maxn 1010#define maxm 200原创 2015-08-10 17:02:33 · 952 阅读 · 1 评论 -
POJ 2031 && ZOJ 1718--Building a Space Station【最小生成树 && kurskal && 水题】
Building a Space StationTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 5655 Accepted: 2848DescriptionYou are a member of the space station engineerin原创 2015-08-10 17:38:25 · 913 阅读 · 0 评论 -
ZOJ 1516--Uncle Tom's Inherited Land【二分图 && 求最大匹配数 && 经典建图】
Uncle Tom's Inherited LandTime Limit: 2 Seconds Memory Limit: 65536 KB Your old uncle Tom inherited a piece of land from his great-great-uncle. Originally, the property had been in th原创 2015-08-24 12:34:02 · 1745 阅读 · 0 评论 -
POJ 1469 && ZOJ 1140 --COURSES【二分图 && 最大匹配】
COURSESTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 19581 Accepted: 7709DescriptionConsider a group of N students and P courses. Each student visit原创 2015-08-24 10:53:54 · 494 阅读 · 0 评论 -
ZOJ 1654--Place the Robots【二分匹配 && 经典建图】
Place the RobotsTime Limit: 5 Seconds Memory Limit: 32768 KB Robert is a famous engineer. One day he was given a task by his boss. The background of the task was the following:Giv原创 2015-08-24 09:15:50 · 1454 阅读 · 0 评论 -
ZOJ 2587--Unique Attack【判断最小割是否唯一】
题意:给你N个点、M条无向边以及边的权值,又给你源点A和汇点B。问你A到B的最小割是否唯一解析:1、我们先对原图求一次最大流2、对残留网络,我们从S开始,找到所有所有S能到达的点;再从T开始,找出所有能到达T的点。3、判断原网络中是否还有没有访问到的点,如果没有,则唯一,否者,不唯一!原创 2015-09-22 22:08:09 · 581 阅读 · 0 评论