UVA11397 Reconstructing Binary Forests

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=25&page=show_problem&problem=2392 [PDF](https://uva.onlinejudge.org/external/113/p11397.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11397/571b9b524326a9d0f16f758a66c2c6784647d8d2.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11397/54e29bba1c847d4c8262dfedbf0875c085453713.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11397/08b29d84927c69293f128151e4e78f5dd35384d9.png)