-->
当前位置:首页 > 题库

PROGRAMMING:Matrix exchange row

Luz5年前 (2021-05-10)题库390
###Task description
Given a 5 * 5 matrix (mathematically, an R × The matrix of C is a rectangular array composed of elements of R rows and C columns. The n-th and m-th rows are exchanged and the exchanged results are output.
###Input format:
Input a total of 6 lines, the first 5 line elements of the matrix, elements and elements separated by a space.
Line 6 contains two integers m and N, separated by a space( 1 <= m,n <= 5)
###Output format:
Output the matrix after the exchange, each line element of the matrix occupies one line, and the elements are separated by a space.
###Input example:
```in
1 2 2 1 2
5 6 7 8 3
9 3 0 5 3
7 2 1 4 6
3 0 8 2 4
1 5
```
###Output example:
```out
3 0 8 2 4
5 6 7 8 3
9 3 0 5 3
7 2 1 4 6
1 2 2 1 2
```
###Title Source
Note: this topic is selected from openjudge website http://noi.openjudge.cn/ch0108/01/






answer:If there is no answer, please comment