Dima the hamster enjoys nibbling different things: cages, sticks, bad problemsetters and even trees! Recently he found a binary search tree and instinctively nibbled all of its edges, hence messing up the vertices. Dima knows that if Andrew, who has…
http://codeforces.com/contest/1025/problem/D D. Recovering BST time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Dima the hamster enjoys nibbling different things: cages, sticks, bad problems…