1757. Omen

During the long joyful time with Hefeng, though, Yunyan sometimes felt weird and had nightmares, in which his power vanished and he would then disappeared. He got afraid and decided to prepare some contingencies. He found an Abyss Chronosphere which can go back to the previous time. Feeling restless, he decided to carry it all the time in case of accidents. However, it's too big to carry. To compress it, he needed to do as follow:

Given n integer points in two dimensional Euclidean plane indexed from 1 to n (inclusive). You should divide these points into k groups, satisfying every point belongs to only one group and every group has at least one point. Define the distance of two groups is the shortest distance of two points where one point belongs to the first group and the other point belongs to the second group. In other word, given two groups G_i,G_j(i\neq j,1\le i,j\le k) , \forall P(x_p,y_p)\in G_i,Q(x_q,y_q)\in G_j , the distance of G_i,G_j is $d(i,j)=\min{\sqrt{|x_p-x_q|^2+|y_p-yq|^2}} . Let p=\min{i,j\in[1,k],i\neq j} d(i,j) .You should find a division scheme, so that p$ is maximized among all possible division schemes.

输入

Input the first line with two integers n,k(2\le k\le n\le10^3) .

Then input n lines, the i-th line with two integers x_i,y_i(-10^5\le x_i,y_i\le10^5) .

It's guaranteed that \forall i\le i < j\le n , it's impossible that x_i=x_j\wedge y_i=y_j .

输出

Output the first line with one integer p^2 .

Then output k lines, for each line: the first integer s_i in the i-th line is the number of points in the i-th group. Then output s_i integers denoting the indexes of all points in the i-th group. You can output them in any order.

If multiple schemes available, output any.

样例

标准输入 复制文本
4 2
0 0
0 1
1 1
1 0
标准输出 复制文本
1
2 1 2
2 3 4
标准输入 复制文本
9 3
2 2
2 3
3 2
3 3
3 5
3 6
4 6
6 2
6 3
标准输出 复制文本
4
4 1 2 3 4
3 5 6 7
2 8 9

来源

2022 软件学院 ACM 集训队筛选赛 (热身赛)

登录以提交代码。
单点时限 1 秒
内存限制 128 MB
提交 18
通过 4