Python3 implementation to find the minimum number of operations required to move from ( 1 , 1 ) to ( N , M )
MAX = 1e18 NEW_LINE v = [ [ 0 , 0 ] ] * ( 151 ) NEW_LINE dp = [ [ - 1 for i in range ( 151 ) ] for i in range ( 151 ) ] NEW_LINE