UVA11504 Dominos

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=27&page=show_problem&problem=2499 [PDF](https://uva.onlinejudge.org/external/115/p11504.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11504/7862a79ef2dab6dd0b57dddcd6ab518604e732ff.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11504/41e26e01fbcc39fa91fe7252518b46b3101f663b.png)

Output Format

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