UVA10358 Matrix

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=15&page=show_problem&problem=1299 [PDF](https://uva.onlinejudge.org/external/103/p10358.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10358/b370e4b6a2a17dde577b7ae937ba26c9f27320ff.png)

Input Format

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

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10358/76375e080e095972c3bf2040f38b2f692e506cdc.png)