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 nn integer points in two dimensional Euclidean plane indexed from 11 to nn (inclusive). You should divide these points into kk 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 Gi,Gj(ij,1i,jk)G_i,G_j(i\neq j,1\le i,j\le k) , P(xp,yp)Gi,Q(xq,yq)Gj\forall P(x_p,y_p)\in G_i,Q(x_q,y_q)\in G_j , the distance of Gi,GjG_i,G_j is d(i,j)=minxpxq2+ypyq2d(i,j)=\min{\sqrt{|x_p-x_q|^2+|y_p-y_q|^2}} . Let p=mini,j[1,k],ijd(i,j)p=\min_{i,j\in[1,k],i\neq j} d(i,j) .You should find a division scheme, so that pp is maximized among all possible division schemes.

输入

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

Then input nn lines, the i-th line with two integers xi,yi(105xi,yi105)x_i,y_i(-10^5\le x_i,y_i\le10^5) .

It's guaranteed that ii<jn\forall i\le i < j\le n , it's impossible that xi=xjyi=yjx_i=x_j\wedge y_i=y_j .

输出

Output the first line with one integer p2p^2 .

Then output kk lines, for each line: the first integer sis_i in the i-th line is the number of points in the i-th group. Then output sis_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