L - Cat VS Dog(匈牙利)

include include include include include using namespace std; char a[121][121]; char b[121][121]; int g[121][121]; bool vis[121]...

2017-10-13 08:55:34

阅读数:258

评论数:2

K - 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 yo...

2017-10-12 21:31:45

阅读数:123

评论数:0

J - Air Raid(Hopcroft-Carp)

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 inte...

2017-10-12 20:54:41

阅读数:145

评论数:0

文章标题

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 ...

2017-10-12 20:43:58

阅读数:104

评论数:0

H - 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 reaso...

2017-10-12 19:55:06

阅读数:223

评论数:0

G - 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 th...

2017-10-11 21:46:36

阅读数:179

评论数:0

F - Rain on your Parade(Hopcroft-Carp)

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 so...

2017-10-11 20:57:40

阅读数:141

评论数:0

E - 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 entrie...

2017-10-09 20:25:22

阅读数:144

评论数:0

D - 棋盘游戏(匈牙利算法)

小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希...

2017-10-09 17:17:30

阅读数:151

评论数:0

C - 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 possibl...

2017-08-23 21:24:02

阅读数:100

评论数:0

B - 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. B...

2017-08-23 20:56:58

阅读数:158

评论数:0

二分图的判断--染色

怎样判断一个图是否为二分图? 很简单,用染色法,即从其中一个顶点开始,将跟它邻接的点染成与其不同的颜色,如果邻接的点有相同颜色的,则说明不是二分图,每次用bfs遍历即可。判断二分图方法: 用染色法,把图中的点染成黑色和白色。 首先取一个点染成白色,然后将其相邻的点染成黑色,如果发现有相邻且同...

2017-08-23 20:09:34

阅读数:186

评论数:0

Air Raid(匈牙利)

Air RaidTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 5542 Accepted Submission(s): 372...

2017-08-23 19:25:53

阅读数:194

评论数:0

Machine Schedule(二分图匹配--匈牙利算法)

Machine Schedule Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 6733 Accepted Submissi...

2017-08-23 19:19:28

阅读数:118

评论数:0

Girls and Boys(二分图--匈牙利算法)

Girls and BoysTime Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 12197 Accepted Submissio...

2017-08-23 18:53:22

阅读数:116

评论数:0

二分图

1.定义: 二分图又称作二部图,是图论中的一种特殊模型。 设G=(V,E)是一个无向图,如果顶点V可分割为两个互不相交的子集(A,B),并且图中的每条边(i,j)所关联的两个顶点i和j分别属于这两个不同的顶点集(i in A,j in B),则称图G为一个二分图。(BD) 2.推荐文章 3....

2017-08-23 17:02:04

阅读数:151

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭