UVA11897 Jingling Dominoes

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=226&page=show_problem&problem=2997 [PDF](https://uva.onlinejudge.org/external/118/p11897.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11897/dac9ee33d70cf06cd944632513d8189803df0a83.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11897/765fb4e18e41bacfa625dccfef380687f4f4dec9.png)