
二分图
文章平均质量分 88
YOONGI
这个作者很懒,什么都没留下…
展开
-
The Accomodation of Students (二分图匹配,匈牙利算法,染色法判断)
The Accomodation of StudentsThere 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...原创 2018-08-04 11:11:33 · 235 阅读 · 1 评论 -
Fire Net
Fire NetSuppose 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...原创 2018-08-04 12:00:26 · 595 阅读 · 0 评论 -
Courses (匈牙利算法)
CoursesConsider 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 student...原创 2018-08-04 15:28:02 · 319 阅读 · 0 评论 -
棋盘游戏 (匈牙利算法)
棋盘游戏小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些...原创 2018-08-04 16:00:38 · 538 阅读 · 0 评论 -
HDU-2063 过山车 (二分图匹配,匈牙利模板)
过山车RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partn...原创 2019-04-24 16:32:40 · 118 阅读 · 0 评论 -
SCU - 4439 Vertex Cover (二分图最小点覆盖 匈牙利算法)
Vertex Coverfrog has a graph withnnverticesv(1),v(2),…,v(n)v(1),v(2),…,v(n)andmmedges(v(a1),v(b1)),(v(a2),v(b2)),…,(v(am),v(bm))(v(a1),v(b1)),(v(a2),v(b2)),…,(v(am),v(bm)).She would like to...原创 2019-04-24 17:04:51 · 210 阅读 · 0 评论 -
CodeForces - 687A NP-Hard Problem (二分图判断染色法)
NP-Hard ProblemRecently, Pari and Arya did some research about NP-Hard problems and they found theminimum vertex coverproblem very interesting.Suppose the graphGis given. SubsetAof its verti...原创 2019-07-31 10:04:54 · 215 阅读 · 0 评论