How to Solve "Cheapest Paths in a Grid" - ZCO 2010

Link Here: Indian Computing Olympiad Archives 2010 - IARCS
Hi! Can anybody help me to solve the problem - Cheapest Paths in a Grid?
Any help would be much appreciated. Thanks

Its a standard grid dp problem, google about grid dp problems you will get the solution easily.