UVA10503 The dominoes solitaire

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1444 [PDF](https://uva.onlinejudge.org/external/105/p10503.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10503/5cd11e5446f11bac1e4cf1776c98827ff41834ea.png)

Input Format

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

Output Format

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