I tried to solve LVADER from spoj. Can anyone please provide detailed explanation to the solution of this problem.