并查集
weixin_44040169
这个作者很懒,什么都没留下…
展开
-
电影节(并查集)
电影节Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit StatisticProblem Description某届电影节评选电影,共有两部电影进入最后评选环节,有n名观众,每个人有一次投票的机会,每个人都按照规则投给其中一部电影。为了了解情况,记者随机询问了一些人,一共询问了m次,特别神奇的是,记者每次都询问两个人,而且这两个人都把票投给...原创 2019-07-29 17:42:54 · 85 阅读 · 0 评论 -
图论八:欧拉回路(连通图+偶数度)
数据结构实验之图论八:欧拉回路Time Limit: 1000 ms Memory Limit: 65536 KiBSubmit Statistic DiscussProblem Description在哥尼斯堡的一个公园里,有七座桥将普雷格尔河中两个岛及岛与河岸连接起来。能否走过这样的七座桥,并且每桥只走一次?瑞士数学家欧拉最终解决了这个问题并由此创立了拓扑学。欧拉通过对七桥问题的研究...原创 2019-07-31 16:18:04 · 965 阅读 · 0 评论 -
J - A Bug's Life(带权并查集)
BackgroundProfessor Hopper is researching the sexual behavior of a rare species of bugs. He assumes that they feature two different genders and that they only interact with bugs of the opposite gende...原创 2019-08-08 08:58:12 · 118 阅读 · 0 评论 -
D - How Many Answers Are Wrong
D - How Many Answers Are WrongTT and FF are … friends. Uh… very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following game with him. This is a very humdrum game....原创 2019-08-14 11:26:42 · 81 阅读 · 0 评论 -
L - 小希的迷宫(并查集)
L - 小希的迷宫上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路)。小希现在把她的设计图给...原创 2019-08-14 13:59:03 · 109 阅读 · 0 评论 -
M - Is It A Tree?(并查集)
M - Is It A Tree?A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed edges between nodes satisfying the following p...原创 2019-08-14 15:41:49 · 77 阅读 · 0 评论 -
E - 食物链(带权并查集)
E - 食物链很棒的博主讲解原文链接:https://blog.csdn.net/niushuai666/article/details/6981689以下有上文收获而得动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成...原创 2019-08-07 20:40:14 · 117 阅读 · 0 评论 -
Find them, Catch them(带权并查集)
Find them, Catch themTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 58922 Accepted: 17904DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions ...原创 2019-08-12 15:38:29 · 55 阅读 · 0 评论