Highway Bypass -can someone please point out the mistake in my solution.

question : CodeChef: Practical coding for everyone

dp state represents no. of ways to go to target given that next move will be 0(down) or 1(right) and the no. of moves left in that direction.

rleft : moves left in right direction

dleft : moves left in downwards direction

solution : GWwTzf - Online C++0x Compiler & Debugging Tool - Ideone.com