Rosetta Problems

Diameter of a Tree

https://onlinejudge.u-aizu.ac.jp/problems/GRL_5_A