{"problem":{"name":"[ROIR 2021] 染色 (Day 2)","description":{"content":"用 $c$ 种颜色对一个 $n\\times m$ 的矩阵染色，要求对于任意 $1\\le x_1<x_2\\le n$，$1\\le y_1<y_2\\le m$，$(x_1,y_1)$，$(x_2,y_1)$，$(x_1,y_2)$，$(x_2,y_2)$ 所染的颜色不完全相同。 试构造一组方案。 数据保证有解。","description_type":"Markdown"},"platform":"Luogu","limit":{"time_limit":1000,"memory_limit":131072},"difficulty":{"LuoguStyle":"P4"},"is_remote":true,"is_sync":true,"sync_url":null,"sign":"LGP9767"},"statements":[{"statement_type":"Markdown","content":"用 $c$ 种颜色对一个 $n\\times m$ 的矩阵染色，要求对于任意 $1\\le x_1<x_2\\le n$，$1\\le y_1<y_2\\le m$，$(x_1,y_1)$，$(x_2,y_1)$，$(x_1,y_2)$，$(x_2,y_2)$ 所染的颜色不完全相同。\n\n试构造一组方案。\n\n数据保证有解。\n\n## Input\n\n一行三个整数 $n,m,c$。\n\n## Output\n\n输出 $n$ 行，每一行 $m$ 个范围在 $1\\sim c$ 的整数，表示染色的颜色种类。\n\n[samples]\n\n## Background\n\n**译自 [ROIR 2021](http://neerc.ifmo.ru/school/archive/2020-2021.html) Day2 T3  [Хорошие раскраски](http://neerc.ifmo.ru/school/archive/2020-2021/ru-olymp-regional-2021-day2.pdf)**。\n\n## Note\n\n- 对于 $25\\%$ 的数据，$c=2$。\n- 对于另外 $75\\%$ 的数据，$c=3$。\n- 对于 $100\\%$ 的数据，$2\\le n,m\\le 10$，$2\\le c\\le 3$。\n\n注：附件为本题的 Special Judge，供大家调试。","is_translate":false,"language":"English"}],"meta":{"iden":"LGP9767","tags":["搜索","2021","Special Judge","随机化","Ad-hoc","ROIR（俄罗斯）"],"sample_group":[["2 2 2","1 2\n2 2"]],"created_at":"2026-03-03 11:09:25"}}