unable to understand LOWSUM solution

I am unable to understand the following solution of LOWSUM Problem - CodeChef .
Kindly explain the approach involved in this solution CodeChef: Practical coding for everyone .