UVA11019 Matrix Matcher

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=22&page=show_problem&problem=1960 [PDF](https://uva.onlinejudge.org/external/110/p11019.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11019/0a41c3eb75f4f071a8c8c663afcbb22be9e7d55d.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11019/83e95b0239edd35ffe5ca655b3d11e7331fac888.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11019/64a7a227ecd00a522b0f1aa2397400727cc81018.png)