https://codeforces.me/gym/104536/problem/F
The answer to this is max(d1,d2,ceil(d1/2)+ceil(d2/2)+1) where d1,d2 are diameters of the two trees.
How to prove this ?
https://codeforces.me/gym/104536/problem/F
The answer to this is max(d1,d2,ceil(d1/2)+ceil(d2/2)+1) where d1,d2 are diameters of the two trees.