CF1286B Numbers on Tree
Description
Evlampiy was gifted a rooted tree. The vertices of the tree are numbered from $ 1 $ to $ n $ . Each of its vertices also has an integer $ a_i $ written on it. For each vertex $ i $ , Evlampiy calculated $ c_i $ — the number of vertices $ j $ in the subtree of vertex $ i $ , such that $ a_j < a_i $ .
Illustration for the second example, the first integer is $ a_i $ and the integer in parentheses is $ c_i $ After the new year, Evlampiy could not remember what his gift was! He remembers the tree and the values of $ c_i $ , but he completely forgot which integers $ a_i $ were written on the vertices.
Help him to restore initial integers!
Input Format
N/A
Output Format
N/A