Grid
CodeChefOpen on judge ↗
Your task in this problem is very straightforward. You are given a point in the cartesian plane (m,n) where m>0 and n>0. You start at (0,0) and are allowed to make unit moves along the positive x-axis or the positive y-axis. In other word if you are at a point (x,y) you can move to either (x+1,y) or (x,y+1). Your task is to find out the total number of ways you can reach (m,n) from (0,0) modulus K
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start