Type: FileIO (towin) 1000ms 256MiB

二维数组输入

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

输入一个 nm 列的二维数组,然后输入一个整数 x,将第 ab 列的数据修改为 x(行和列从 1 开始计数),最后输出修改后的数组。

输入格式

  1. 第一行:两个整数 nmn, m ≤ 100),表示数组的行数和列数。
  2. 接下来 n 行:每行 m 个整数,表示二维数组的元素。
  3. 最后一行:三个整数 xab1 ≤ x ≤ 100001 ≤ a ≤ n1 ≤ b ≤ m),表示要修改的值和目标位置。

输出格式

输出修改后的 nm 列二维数组(每行元素用空格分隔)。

输入输出样例

输入 #1

3 3
1 2 3
4 5 6
7 8 9
10 2 2

输出 #1

1 2 3
4 10 6
7 8 9

输入 #2

2 4
11 12 13 14
21 22 23 24
100 1 3

输出 #2

11 12 100 14
21 22 23 24

B班第八天测试

Not Attended
Status
Done
Rule
Ledo
Problem
11
Start at
2025-7-28 19:00
End at
2025-7-28 21:00
Duration
2 hour(s)
Host
Partic.
8