HDU 1421 - Ban Qin Shi
Problem : There are N numbers. Find K distinct pairs of them (2K <= N), and make sum(SQR(pair[i].a-pair[i].b)) minimum.
Solution :
1) If we sort the numbers, the answer must be K pairs that each pair is neighbour in the sorted sequence.
	A. If the 2K number is chosen, the pairs are confirmed: (c[0], c[1]), (c[2], c[3]), ..., (c[2k-1], c[2k]). Since l0^2+l1^2+...+lk^2<=L^2 is always true if l0+l1+...+lk=L.
	B. If there exists unpick number between pairs in ordered sequence, chosen the unpick number instead of one of the pair number will reduce the answer.

2) Denote a to be the sorted numbers. Then let f[i][j] means choose j pairs in first i numbers. Then f[i][j]=min(f[i-1][j-2]+SQR(a[j-1]+a[j]), f[i][j-1]).