随笔分类 -  并查集

摘要:One day n cells of some array decided to play the following game. Initially each cell contains a number which is equal to it's ordinal number (startin 阅读全文
posted @ 2018-02-13 18:00 hinata_hajime 阅读(307) 评论(0) 推荐(0)
摘要:Farmer John's pastoral neighborhood has N farms (2 <= N <= 40,000), usually numbered/labeled 1..N. A series of M (1 <= M < 40,000) vertical and horizo 阅读全文
posted @ 2018-01-04 20:03 hinata_hajime 阅读(198) 评论(0) 推荐(0)
摘要:N children are playing Rochambeau (scissors-rock-cloth) game with you. One of them is the judge. The rest children are divided into three groups (it i 阅读全文
posted @ 2018-01-03 15:11 hinata_hajime 阅读(145) 评论(0) 推荐(0)
摘要:Information Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 422 Accepted Submission(s): 79 Proble 阅读全文
posted @ 2018-01-02 14:59 hinata_hajime 阅读(251) 评论(0) 推荐(0)
摘要:小Hi的学校总共有N名学生,编号1-N。学校刚刚进行了一场全校的古诗文水平测验。 学校没有公布测验的成绩,所以小Hi只能得到一些小道消息,例如X号同学的分数比Y号同学的分数高S分。 小Hi想知道利用这些消息,能不能判断出某两位同学之间的分数高低? Input 第一行包含三个整数N, M和Q。N表示学 阅读全文
posted @ 2018-01-01 18:42 hinata_hajime 阅读(207) 评论(0) 推荐(0)
摘要:B. Mahmoud and Ehab and the bipartiteness time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard outpu 阅读全文
posted @ 2017-09-20 10:42 hinata_hajime 阅读(938) 评论(0) 推荐(0)
摘要:食物链 Time Limit: 1000MS Memory Limit: 10000K Total Submissions: 77338 Accepted: 23029 Description 动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动 阅读全文
posted @ 2017-08-31 16:34 hinata_hajime 阅读(151) 评论(0) 推荐(0)
摘要:T^T的图论 TimeLimit:3000MS MemoryLimit:256MB TimeLimit:3000MS MemoryLimit:256MB 64-bit integer IO format:%lld 64-bit integer IO format:%lld 已解决 | 点击收藏 收藏 阅读全文
posted @ 2017-08-31 15:43 hinata_hajime 阅读(189) 评论(0) 推荐(0)