T503655 「LAOI-6」Radiation
题目背景
[Chinese statement](https://www.luogu.com.cn/problem/T446314?contestId=157920). You must submit your code at the Chinese version of the statement.
题目描述
Tom_nik and Uurist are playing a game on an $n\times m$ board. Initially the board is empty. First, Uurist places $k$ stones on the board, and then Tom_nik will destroy all the stones. **However, for one operation, Tom_nik can only destroy stones that share a row or column**.
Uurist will destroy the stones using the minimum number of operations. However, Tom_nik wants to maximize the number of operations Uurist will take by placing the stone in a proper way. You need to give him a specific placement such that Tom_nik's goal will be achieved.
Note that Uurist has to destroy **all** of the stones.
输入格式
无
输出格式
无
说明/提示
Subtasks are used in this problem.
Subtask 1 ($20$ points): it is guaranteed that $k \leq \min(n,m)$.
Subtask 2 ($12$ points): it is guaranteed that $n = 2$.
Subtask 3 ($18$ points): it is guaranteed that $T,n,m \leq 10$.
Subtask 4 ($20$ points): it is guaranteed that $T \leq 10$, $n,m \leq 300$.
Subtask 5 ($30$ points): No special constraint.
For all tests, it is guaranteed that $1 \leq T \leq 10^4$, $1 \leq n,m \leq 2 \times 10^3$, $0 \leq k \leq nm$, the sum of $nm$ over all test cases does not exceed $5\times 10^6$.