随笔分类 -  并查集

摘要:Description:Nchildren are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three g... 阅读全文
posted @ 2015-10-07 23:13 搁浅の记忆 阅读(151) 评论(0) 推荐(0)
摘要:Description:Now and then you play the following game with your friend. Your friend writes down a sequence consisting of zeroes and ones. You choose a ... 阅读全文
posted @ 2015-10-04 14:43 搁浅の记忆 阅读(150) 评论(0) 推荐(0)
摘要:Description:An earthquake takes place in Southeast Asia. The ACM (Asia Cooperated Medical team) have set up a wireless network with the lap computers,... 阅读全文
posted @ 2015-09-28 13:31 搁浅の记忆 阅读(155) 评论(0) 推荐(0)
摘要:Problem Description:上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它... 阅读全文
posted @ 2015-09-06 12:43 搁浅の记忆 阅读(148) 评论(0) 推荐(0)
摘要:DescriptionA supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an... 阅读全文
posted @ 2015-07-28 17:25 搁浅の记忆 阅读(149) 评论(0) 推荐(0)
摘要:Problem Description:TT and FF are ... friends. Uh... very very good friends -________-bFF is a bad boy, he is always wooing TT to play the following g... 阅读全文
posted @ 2015-07-28 17:06 搁浅の记忆 阅读(156) 评论(0) 推荐(0)
摘要:Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。有人用两种说法对这N个动物所构成的食物链关系进行描述:第一种说法是"1 X Y",表示X和Y... 阅读全文
posted @ 2015-07-22 13:50 搁浅の记忆 阅读(180) 评论(0) 推荐(0)
摘要:Problem Description某省调查乡村交通状况,得到的统计表中列出了任意两村庄间的距离。省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可),并要求铺设的公路总长度为最小。请计算最小的公路总长度。Input测试输入包含若... 阅读全文
posted @ 2015-05-01 00:01 搁浅の记忆 阅读(175) 评论(1) 推荐(0)
摘要:DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. ... 阅读全文
posted @ 2015-04-23 18:32 搁浅の记忆 阅读(130) 评论(0) 推荐(0)