UVA10904 Structural Equivalence

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=21&page=show_problem&problem=1845 [PDF](https://uva.onlinejudge.org/external/109/p10904.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10904/0a80c34fbf6f3b06859e09286ab0a6370199b0fa.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10904/9eb446c8de128f46ae031713f21ed9349cea0ca5.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10904/ea74cbdb26046aa07651b904e0fde75e651ff54a.png)