二分匹配
ZZZ19880423
including
展开
-
Air Raid
https://vjudge.net/contest/238849#problem/J Each paratrooper lands at an intersection and can visit other intersections following the town streets. 每个伞兵可以到没有一个伞兵到过的路口,有向无环图,求最小覆盖路径,最小覆盖路径=节点数-最大匹配数 ...原创 2018-07-28 17:02:35 · 470 阅读 · 0 评论 -
Strategic Game
https://vjudge.net/contest/238849#problem/I 题目的大意就是说给你0-n-1这n个数形成一棵树,站在节点上能看到与他相邻的节点的情况,问最少用多少个人,就可以观察到所有节点的情况,二分匹配;用hk,用匈牙利算法超时 #include<stdio.h> #include<string.h> #include<string&...原创 2018-07-28 16:15:03 · 380 阅读 · 0 评论 -
Rain on your Parade
https://vjudge.net/contest/238849#problem/F 题目的意思就是再有t秒就要下雨了,宾客去拿伞,问最多有多少宾客可以拿到伞 二分匹配,用匈牙利算法一定会超时,就用Hk算法 #include<stdio.h> #include<string.h> #include<string> #include<queue&g...原创 2018-07-28 15:58:34 · 197 阅读 · 0 评论 -
Oil Skimming
https://vjudge.net/contest/238849#problem/G 题目的意思:'#'是石油,有个人挖石油,采集石油的工具可以覆盖一个10米乘20米的长方形,采集时工具不能碰到海水,每一格长10米,二分匹配; #include<stdio.h> #include<string.h> #include<string> #include&l...原创 2018-07-28 17:05:13 · 196 阅读 · 0 评论 -
D. Alex and Julian
https://codeforces.com/contest/1220/problem/D 给你一个无限大的集合B1,有一个有限的集合B2,若在B1中找到两个值x,y,若|x-y|B2,则x和y之间连一条线,问最少删除多少个元素使B1为一个二分图 要使B1成为二分图就是让图中没有奇环 k1*i=k2*j,若k1为奇数,k2为偶数,则形成一个奇环===>>i/gcd(i,j)为奇数...原创 2019-09-21 20:29:54 · 654 阅读 · 0 评论