Alice and Bob are two creatures in a $$$k$$$-dimensional space. In their living space, there are $$$2n$$$ feature points, where the coordinates of the $$$i$$$-th feature point are $$$(x_{i,1},x_{i,2},\ldots,x_{i,k})$$$.
In this space, the distance between two points is defined as their Manhattan distance (i.e., the distance $$$\text{dist}_{i,j}=\sum_{p=1}^{k}|x_{i,p}-x_{j,p}|$$$ between point $$$i$$$ and point $$$j$$$).
Alice and Bob need to collect these feature points. They take turns to select a point from these $$$2n$$$ points, and once a point is selected by any one of them, it cannot be chosen again. Alice goes first. Alice puts her selected points into set $$$S_1$$$, while Bob puts his selected points into set $$$S_2$$$.
$$$\text{val}(S)$$$, The value of a set $$$S$$$, is the sum of distances between all unordered pairs of points in the set, i.e. $$$\text{val}(S)=\sum_{\text{point }i,j\text{ in }S,i \lt j}\text{dist}_{i,j}$$$. Alice wants to maximize $$$\text{val}(S_1)-\text{val}(S_2)$$$, while Bob wants to minimize $$$\text{val}(S_1)-\text{val}(S_2)$$$.
If Alice and Bob both adopt the optimal strategy, please calculate the value of $$$\text{val}(S_1)-\text{val}(S_2)$$$ in the end.
The first line contains two integers $$$n,k$$$ ($$$1\leq n,k\leq 10^5,n\times k\leq 10^5$$$), representing half the number of feature points and the number of dimensions in the space, respectively.
The next $$$2n$$$ lines each contain $$$k$$$ integers $$$x_{i,1},x_{i,2},\ldots,x_{i,k}$$$ ($$$-10^8\leq x_{i,j}\leq 10^8$$$), representing the coordinates of the $$$i$$$-th feature point.
Output an integer, representing the value of $$$\text{val}(S_1)-\text{val}(S_2)$$$ when both Alice and Bob adopt the optimal strategy.
2 21 00 11 10 0
0
| Name |
|---|


