Http://www.usaco.org/index.php?page=viewproblem2&cpid=992

http://www.usaco.org/index.php?page=viewproblem2&cpid=992

hi everyone i need help why the solution is going that way , i want an explanation for the problem solution