P12352 Rabbit Panic (Easy Version)
Background
**Note that in this version of the problem, you don't need to minimize the number of operations, and the constraint of $n$ is different.**
Description
You have a sequence $\{p_n\}$ where initially $p_i = i(1 \leq i \leq n)$.
Each time you can choose $m$ **distinct** numbers $i_1, i_2\dots i_m$, and **simultaneously** set all of $p_{i_1}, p_{i_2}\dots p_{i_m}$ into their mean. **Note that the mean may not be an integer.** In this case, it will never be rounded.
You need to perform at most $2n^2$ operations to make $p_1 = p_2 = \dots = p_n$. **Note that in this version of the problem, you don't need to minimize the number of operations.**
Input Format
Each test consists of multiple test cases. The first line contains a single integer $T(1\leq T\leq 10^4)$ --- the number of sets of test cases. The description of each test case follows.
In each test case, the only line contains two integers --- $n$($1 \leq n \leq 2\times 10^3$) and $m$($1\le m\le n$), representing the length of the sequence and the number $m$.
It's guaranteed that the sum of $n$ over all testcases does not exceed $10^4$.
Output Format
For each test case, on the first line, output the number of operations you perform, $s$. You need to guarantee that $s\le 2n^2$.
On the next $s$ lines, each line contains $m$ distinct integers in the range $[1, n]$ representing an operation.
If there's no solution, just print $s = -1$.
If there are multiple solutions, print any. **Note that you don't need to minimize the number of operations.**
Explanation/Hint
### Sample #1
- $[1,2,3,4,5,6]\to [3.5,3.5,3,4,3.5,3.5]\to [3.5,3.5,3.5,3.5,3.5,3.5]$。
- There may be different but valid solutions.
### Constraints
**This problem uses subtasks.**
- Subtask 0 (20 pts): $1\leq \sum n\leq 10$.
- Subtask 1 (30 pts): $m \bmod2 = 0$.
- Subtask 2 (10 pts): $n \bmod 2 = 0$ and $m \bmod 2=1$.
- Subtask 3 (40 pts): No additional constraints.
It is guaranteed that $1 \leq T \leq 10^3$, $1 \leq m \leq n \leq 2\times 10^3$, $1 \leq \sum n \leq 10^4$.