Ram is initially at (1,1). He wants to reach destination at (n,m). Find the number of ways he can reach the destination given that at 1 move he can either move (2,1) or (1,2) i.e, if he is at 1,1 he can either go to (3,2) or(2,3) and so on . We cannot use dp here as n and m is 1e6;
Test case n=4,m=4
Output -2
n<=1e6;
m<=1e6;
Comments (2)

