摘要: http://acm.hdu.edu.cn/status.php 题意:给出一棵树,求出所有结点所能到达的最远距离。 解法一:任意一点所能到达的最远距离一定是树的直径的某一端点;由树的直径的性质可得。 #include<bits/stdc++.h> using namespace std ; typ 阅读全文
posted @ 2020-09-06 20:07 无名菜鸟1 阅读(180) 评论(0) 推荐(0) 编辑