并查集
bootdubbo
这个作者很懒,什么都没留下…
展开
-
D. Harmonious Graph【并查集】
You’re given an undirected graph with n nodes and m edges. Nodes are numbered from 1 to n.The graph is considered harmonious if and only if the following property holds:For every triple of integers ...原创 2019-11-17 14:39:36 · 298 阅读 · 0 评论 -
D. Two Sets
outputstandard outputLittle X has n distinct integers: p1, p2, …, pn. He wants to divide all of them into two sets A and B. The following two conditions must be satisfied:If number x belongs to set ...原创 2019-11-05 14:35:56 · 245 阅读 · 0 评论 -
HDU - 1829 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-10-23 21:20:27 · 149 阅读 · 0 评论 -
Cow and Snacks
outputstandard outputThe legendary Farmer John is throwing a huge party, and animals from all over the world are hanging out at his house. His guests are hungry, so he instructs his cow Bessie to bri...原创 2019-09-16 23:08:48 · 241 阅读 · 0 评论