匹配问题
萧瑟1
这个作者很懒,什么都没留下…
展开
-
Hdu 1401 Fire Net
题目:Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.A blockhouse is a small castl...原创 2019-03-06 08:42:01 · 149 阅读 · 0 评论 -
hdu 1281 棋盘游戏
题目:小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些格子...原创 2019-03-08 11:51:05 · 151 阅读 · 0 评论 -
Hdu 2389 Rain on your Parade hk算法
题目:You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a soothing wind sends fresh, salty air from the se...原创 2019-03-07 21:23:46 · 260 阅读 · 0 评论 -
Hdu 2819 Swap 匈牙利算法
题目:Given an N*N matrix with each entry equal to 0 or 1. You can swap any two rows or any two columns. Can you find a way to make all the diagonal entries equal to 1?InputThere are several test c...原创 2019-03-07 17:27:08 · 120 阅读 · 0 评论 -
poj 3189 Steady Cow Assignment 二分图多重匹配+二分
题目:Farmer John's N (1 <= N <= 1000) cows each reside in one of B (1 <= B <= 20) barns which, of course, have limited capacity. Some cows really like their current barn, and some are not ...原创 2019-03-10 20:11:50 · 137 阅读 · 0 评论 -
poj 2112 Optimal Milking 二分图多重匹配+floyd+二分
题目:FJ has moved his K (1 <= K <= 30) milking machines out into the cow pastures among the C (1 <= C <= 200) cows. A set of paths of various lengths runs among the cows and the milking ma...原创 2019-03-10 17:12:22 · 141 阅读 · 0 评论 -
Hdu 1669 Jamie's Contact Groups 二分图多重匹配+二分
题目:Jamie is a very popular girl and has quite a lot of friends, so she always keeps a very long contact list in her cell phone. The contact list has become so long that it often takes a long time fo...原创 2019-03-10 15:48:32 · 742 阅读 · 0 评论 -
Hdu 3829 Cat VS Dog
题目:The zoo have N cats and M dogs, today there are P children visiting the zoo, each child has a like-animal and a dislike-animal, if the child's like-animal is a cat, then his/hers dislike-animal m...原创 2019-03-10 10:13:12 · 140 阅读 · 0 评论 -
poj 2594 Treasure Exploration 匈牙利算法+floyd缩点
题目:Have you ever read any book about treasure exploration? Have you ever see any film about treasure exploration? Have you ever explored treasure? If you never have such experiences, you would never...原创 2019-03-09 16:40:09 · 118 阅读 · 0 评论 -
poj 1422 Air Raid 匈牙利算法
题目:Consider a town where all the streets are one-way and each street leads from one intersection to another. It is also known that starting from an intersection and walking through town's streets yo...原创 2019-03-09 11:53:26 · 112 阅读 · 0 评论 -
Hdu 1803 Courses 二分图匹配模板题
题目:Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students th...原创 2019-03-06 20:13:55 · 121 阅读 · 0 评论 -
poj 1463 Strategic Game 匈牙利算法
题目:Bob enjoys playing computer games, especially strategic games, but sometimes he cannot find the solution fast enough and then he is very sad. Now he has the following problem. He must defend a me...原创 2019-03-09 10:18:23 · 108 阅读 · 0 评论 -
poj 3020 Antenna Placement 匈牙利算法
题目:The Global Aerial Research Centre has been allotted the task of building the fifth generation of mobile phone nets in Sweden. The most striking reason why they got the job, is their discovery of ...原创 2019-03-09 09:31:43 · 147 阅读 · 0 评论 -
Hdu 4185 Oil Skimming 匈牙利算法
题目:Thanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude oil floating in the Gulf of Mexico just waiting to be scooped up...原创 2019-03-08 18:36:44 · 124 阅读 · 0 评论 -
Hdu 2444 The Accomodation of Students
题目:There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A and C know each o...原创 2019-03-06 14:22:38 · 108 阅读 · 0 评论 -
“浪潮杯”山东省第九届ACM大学生程序设计竞赛(感谢山东财经大学) Bullet
思路:先求出二分图的最大匹配,然后二分找答案。代码如下:#include <cstdio>#include <cstring>#include <algorithm>#include <iostream>using namespace std;const int maxn=505;int a[maxn][maxn];int...原创 2019-03-13 09:24:33 · 347 阅读 · 0 评论