UVA10228 A Star not a Tree?

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=14&page=show_problem&problem=1169 [PDF](https://uva.onlinejudge.org/external/102/p10228.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10228/ec51dc78227d21bb2d9c839ef3e178d8ab3ff99a.png)

Input Format

N/A

Output Format

N/A