Hello codeforces
I recently encountered this problem in an interview.
You have an infinite grid. You know the value of m and n and you need to find number of paths from (0 , 0) to (m , n) with condition that you are allowed to move up, down, left and right.
How to do this?
Are you sure that you can walk up and to the left?
If so, then the answer, I think, is infinity
I think there are some limits in this problem. E.g. you cant go out from n*m rectangle and you can visit each cell no more than one time.
Maybe you want to ask different simple ways? i.e. there are not cycles.
The answer is still "infinite".