随笔分类 -  并查集

摘要:题目描述 Given two arrays A, B of length n and m separately, you have to merge them into only one array C (of length n + m) obeying the rule that the rela 阅读全文
posted @ 2019-05-02 17:34 Albert_liu 阅读(628) 评论(0) 推荐(0)
摘要:题目描述 Dove和Cicada是好朋友,他们经常在一起打扑克来消遣时光,但是他们打的扑克有不同的玩法。最开始时,牌桌上有n个牌堆,每个牌堆有且仅有一张牌,第i个牌堆里那个扑克牌的编号为i,任意两张牌仅有标号不同。游戏会进行m轮,每轮Dove可以执行下列操作之一:·1 x y,将编号为x,y的牌所在 阅读全文
posted @ 2019-02-07 19:34 Albert_liu 阅读(293) 评论(0) 推荐(0)