矩阵解压 Matrix Decompressing

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=22&page=show_problem&problem=2023 [PDF](https://uva.onlinejudge.org/external/110/p11082.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11082/4bfbadba5826e7df25fe35bb6c563f54e80f8b54.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11082/1c9470803fa67b39a07afe5716e1afb7f904286c.png)

输出格式


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

输入输出样例

输入样例 #1

2
3 4
10 31 58
10 20 37 58
3 4
10 31 58
10 20 37 58

输出样例 #1

Matrix 1
1 6 1 2
1 2 2 16
8 2 14 3
Matrix 2
1 1 1 7
1 1 7 12
8 8 9 2