Tree And Extra Edge

hard
Input
Output
Click Run to execute
Previous
Longest Good Segment

Related Questions