摘要:
求当前结点到根节点的距离Sample Input 2 1 //n m 1 2 1 2 //询问 5 2 1 2 1 3 3 4 3 5 4 2 //询问 4 5 0 0 Sample Output lxh pfz lxh 1 # include 2 # include 3 # include ... 阅读全文
摘要:
求连通分量Sample Input10 91 21 31 41 51 61 71 81 91 1010 42 34 54 85 80 0Sample OutputCase 1: 1Case 2: 7 1 # include 2 # include 3 # include 4 # include... 阅读全文
摘要:
求0号结点所在集合的元素个数Sample Input100 42 1 25 10 13 11 12 142 0 12 99 2200 21 55 1 2 3 4 51 00 0Sample Output411 1 # include 2 # include 3 # include 4 # in... 阅读全文
摘要:
求集合里元素的个数 输出最大的个数是多少Sample Input41 23 45 61 641 23 45 67 8 Sample Output42 1 # include 2 # include 3 # include 4 # include 5 # include 6 # includ... 阅读全文