#3586. C++-稀疏矩阵

C++-稀疏矩阵

Background

Description

注:n和m皆为正整数,且<=100;输出时,先从左到右,再从上到下。

image

Format

Input

Output

Samples

3 5
0 0 0 0 5
0 0 4 0 0
1 0 0 0 1
1 5 5
2 3 4
3 1 1
3 5 1

Limitation

1s, 1024KiB for each test case.