String exchange
Problem
Given a matrix of size
NxM
and two numbers
k1
and
k2
. Swap the lines with indices
k1
and
k2
.
Input
The first line contains numbers
N
and
M
(
\(0<N,M<=10\)) . Next come
N
lines of
M
numbers each. Each number modulo no more than 100. Following a new line are two numbers
k1
,
k2
(
\(0<k1 ,k2<=N\)).
Imprint
Display the transformed matrix, allocating three character spaces for each element.
Example
# |
Input |
Output |
1 |
4 5
72 50 18 79 74
48 93 27 9 76
33 76 69 59 58
19 65 53 90 77
20 |
33 76 69 59 58
48 93 27 9 76
72 50 18 79 74
19 65 53 90 77
|