{"raw_statement":[{"iden":"statement","content":"给定一张 $n \\times m$ 的画布（每个格子里有一个数字），以及一个 $k \\times k$ 的“模板”。我们要把这个模板放在画布的左上角，然后一点一点向右、向下移动。每次移动的时候，把模板里的数字和画布上对应的数字相乘，然后加起来，得到一个新数字。这样，我们就会得到一张新的、稍小的画布。这个过程叫“卷积”。\n\n例如，假设我们有这样一张 $3 \\times 3$ 的画布：\n$$\n\\begin{bmatrix}\n1 & 2 & 3 \\\\\n4 & 5 & 6 \\\\\n7 & 8 & 9\n\\end{bmatrix},\n$$\n及这样一张 $2 \\times 2$ 的模板：\n$$\n\\begin{bmatrix}\n3 & 2\\\\\n1 & 5 \\\\\n\\end{bmatrix},\n$$\n执行“卷积”后，我们可以得到以下结果：\n$$\n\\begin{bmatrix}\na & b \\\\\nc & d \\\\\n\\end{bmatrix}\n\n= \n\n\\begin{bmatrix}\n36 & 47 \\\\\n69 & 80 \\\\\n\\end{bmatrix}\n,\n$$\n其中：\n| 结果变量 | 对应画布位置 | 模板 | 结果 |\n| :-: | :-: | :-: | :-: |\n| $a$ | $\\begin{bmatrix} \\color{red}{1} & \\color{orange}{2} & 3 \\\\ \\color{green}{4} & \\color{blue}{5} & 6 \\\\ 7 & 8 & 9 \\end{bmatrix}$ | $\\begin{bmatrix} \\color{red}{3} & \\color{orange}{2} \\\\ \\color{green}{1} & \\color{blue}{5} \\end{bmatrix}$ | ${\\color{red}{1}} \\times {\\color{red}{3}} + {\\color{orange}{2}} \\times {\\color{orange}{2}} + {\\color{green}{4}} \\times {\\color{green}{1}} + {\\color{blue}{5}} \\times {\\color{blue}{5}} = 36$ |\n| $b$ | $\\begin{bmatrix} 1 & \\color{red}{2} & \\color{orange}{3} \\\\ 4 & \\color{green}{5} & \\color{blue}{6} \\\\ 7 & 8 & 9 \\end{bmatrix}$ | $\\begin{bmatrix} \\color{red}{3} & \\color{orange}{2} \\\\ \\color{green}{1} & \\color{blue}{5} \\end{bmatrix}$ | ${\\color{red}{2}} \\times {\\color{red}{3}} + {\\color{orange}{3}} \\times {\\color{orange}{2}} + {\\color{green}{5}} \\times {\\color{green}{1}} + {\\color{blue}{6}} \\times {\\color{blue}{5}} = 47$ |\n| $c$ | $\\begin{bmatrix} 1 & 2 & 3 \\\\ \\color{red}{4} & \\color{orange}{5} & 6 \\\\ \\color{green}{7} & \\color{blue}{8} & 9 \\end{bmatrix}$ | $\\begin{bmatrix} \\color{red}{3} & \\color{orange}{2} \\\\ \\color{green}{1} & \\color{blue}{5} \\end{bmatrix}$ | ${\\color{red}{4}} \\times {\\color{red}{3}} + {\\color{orange}{5}} \\times {\\color{orange}{2}} + {\\color{green}{7}} \\times {\\color{green}{1}} + {\\color{blue}{8}} \\times {\\color{blue}{5}} = 69$ |\n| $d$ | $\\begin{bmatrix} 1 & 2 & 3 \\\\ 4 & \\color{red}{5} & \\color{orange}{6} \\\\ 7 & \\color{green}{8} & \\color{blue}{9} \\end{bmatrix}$ | $\\begin{bmatrix} \\color{red}{3} & \\color{orange}{2} \\\\ \\color{green}{1} & \\color{blue}{5} \\end{bmatrix}$ | ${\\color{red}{5}} \\times {\\color{red}{3}} + {\\color{orange}{6}} \\times {\\color{orange}{2}} + {\\color{green}{8}} \\times {\\color{green}{1}} + {\\color{blue}{9}} \\times {\\color{blue}{5}} = 80$ |\n\n现在给定画布和模板，请你算出卷积之后的画布内容。"},{"iden":"input","content":"输入共 $n + k + 1$ 行。\n\n第一行三个整数 $n, m, k$，分别表示画布的大小和模板的大小；  \n接下来 $n$ 行，每行 $m$ 个整数，表示原始画布；  \n接下来 $k$ 行，每行 $k$ 个整数，表示模板内容。"},{"iden":"output","content":"输出 $n - k + 1$ 行，每行 $m - k + 1$ 个整数，代表一张大小为 $(n - k + 1) \\times (m - k + 1)$ 的卷积结果。"},{"iden":"note","content":"### 数据规模与约定\n\n本题共 $10$ 个测试点。对于 $100\\%$ 的测试数据，$1 \\le n, m, k \\le 100$，$k \\leq \\min(n, m)$，所有输入数据中的整数都在 $1$ 到 $10^7$ 之间。\n\n| 测试点编号 | $n, m$ | $k$ | 特殊性质 |\n| :----------: | :----------: | :----------: | :-: |\n| $1, 2$ | $\\leq 10$ | $\\leq 10$ | 无 |\n| $3$ | $\\leq 100$ | $= 1$ | 无 |\n| $4, 5$ | $\\leq 100$ | $\\leq 100$ | $k = m$ |\n| $6, 7$ | $\\leq 100$ | $\\leq 100$ | “模板”内的整数全为 $1$ |\n| $8 \\sim 10$ | $\\leq 100$ | $\\leq 100$ | 无 |\n"}],"translated_statement":null,"sample_group":[["3 3 2\n1 2 3\n4 5 6\n7 8 9\n3 2\n1 5\n","36 47\n69 80\n"],["4 4 2\n1 2 1 2\n3 4 3 4\n5 6 5 6\n7 8 7 8\n1 1\n1 1\n","10 10 10\n18 18 18\n26 26 26\n"],["7 10 3\n9 7 8 10 8 5 1 9 10 5\n5 2 3 1 1 5 1 1 1 3\n1 10 9 5 5 2 1 8 6 1\n10 1 8 10 1 3 1 1 8 5\n7 9 2 2 4 3 1 1 1 1\n5 5 1 9 4 1 7 10 7 10\n10 8 9 3 1 10 1 6 1 9\n1 7 1\n2 9 5\n1 1 9\n","201 173 165 135 112 120 153 133\n242 249 126 116 83 79 187 140\n183 231 200 119 70 50 125 161\n149 200 167 97 131 129 112 185\n231 133 144 186 98 191 164 230\n"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}