http://acm.sgu.ru/problem.php?contest=0&problem=206
please , Help to solve this task
I reduced this task to linear programming, and linear programming to dual
w[j] >= w[i] (where j = n .. m and i = 1 .. n-1 ) this is the least condition for minimality
and We must find x[i] (where i = 1..m) ,such that x[1] + x[2] + .. + x[m] is minimal
and conditions are:
w[j]+x[j] >= w[i] - x[i]
This equation is linear programming, and dual form of this equation is the optimal match problem
so we can find sum of x[1]+x[2]+...+x[m], and how to find x[i] ?