首页 > 1 or 2
头像 num73
发表于 2020-07-13 09:06:15
I题题解 这道题和HDU 3551是一样的。关键在拆点建图上把点v拆成d[v]个点。同时将每条边拆成2个点分别为。将相连。同时将与拆成的个点连边,将与拆成的个点连边。如题目中样例的第三组数据: 3 21 1 21 32 3 第1个点拆成1个点,编号为1。第2个点拆成1个点,编号为2。第3个点拆成 展开全文
头像 回归梦想
发表于 2021-01-20 17:46:28
题目描述Bobo has a graph with n vertices and m edges where the i-th edge is between the vertices ai and bi. Find out whether is possible for him to choose 展开全文
头像 jswwsj
发表于 2020-07-16 17:51:29
用最大流是个假算法(网络流题解:https://blog.csdn.net/qq_43497140/article/details/107302444#comments_12808405),虽然牛客没有重测,我还是来补一发带花树正解(csdn: https://blog.csdn.net/ 展开全文
头像 daicon
发表于 2020-09-19 16:34:57
题解 我们考虑匹配问题,每条边会关联两个点,那么肯定是点和边有关联;每个点需要减的度数是,因此每个点拆成个点,然后每条边拆成两个点和,连完边之后这就是一个二分图,跑完图匹配之后必定还有某些边没有匹配上(因为每一个拆出来的点都会连条边,最大的情况也不过是全部都匹配上);但是我们对于边拆出来的点也有限制 展开全文
头像 11D_Beyonder
发表于 2020-08-11 03:57:44
题目描述   Bobo has a graph with vertices and m edges where the -th edge is between the vertices and . Find out whether is possible for him to choose so 展开全文