UVA12701 The Twin Head Dragon

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=823&page=show_problem&problem=4439 [PDF](https://uva.onlinejudge.org/external/127/p12701.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12701/35ddf16238b840683451426f38ca51a231b0ff8c.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12701/5f86e1eb011889601a4663f114a85f170b329e1f.png)