摘要: Farmer John and Betsy are playing a game with N (1 B C从高到底的三个方块,那么dis[A C]=dis[B C]+dis[A B]。需要注意的是路径压缩的时候,递归求节点到根节点的距离,具体请看代码。 include include using 阅读全文
posted @ 2017-12-02 10:55 Zireael 阅读(173) 评论(0) 推荐(0) 编辑