my solution is CodeChef: Practical coding for everyone for the problem LOSTMAX Problem - CodeChef
You should see this link link text