PROGRAMMING:Transpose of sparse matrix represented by triple order table Ⅱ
Transpose of sparse matrix represented by triple Order Table II. Let a and B be the variables in the triple order table, representing the matrices m and t respectively. It is required to transpose according to the order of triples in a, and place the transposed triples in the appropriate position in B.
###Input format:
Enter the number of rows m, the number of columns N and the number of non-zero elements t of the first behavior matrix.
Enter row t in the order of row priority, with 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
###Output format:
Output the placed position subscript in the order of placing in B, the row label, column label and value of the transposed triple, and separate the data with space, a total of T rows.
###Input sample 1:
```in
3 4 3
0 1 -5
1 0 1
2 2 2
```
###Output sample 1:
```out
1 1 0 -5
0 0 1 1
2 2 2 2
```
answer:If there is no answer, please comment
###Input format:
Enter the number of rows m, the number of columns N and the number of non-zero elements t of the first behavior matrix.
Enter row t in the order of row priority, with 3 numbers in each row, representing the row label, column label and value of non-zero elements respectively.
###Output format:
Output the placed position subscript in the order of placing in B, the row label, column label and value of the transposed triple, and separate the data with space, a total of T rows.
###Input sample 1:
```in
3 4 3
0 1 -5
1 0 1
2 2 2
```
###Output sample 1:
```out
1 1 0 -5
0 0 1 1
2 2 2 2
```
answer:If there is no answer, please comment