dp [ a ] [ b ] , here a , b is the difference of x & tx and y & ty respectively .
dp [ 1 ] [ 0 ] = 3 ; NEW_LINE dp [ 0 ] [ 1 ] = 3 ; NEW_LINE dp [ 1 ] [ 1 ] = 2 ; NEW_LINE dp [ 2 ] [ 0 ] = 2 ; NEW_LINE dp [ 0 ] [ 2 ] = 2 ; NEW_LINE dp [ 2 ] [ 1 ] = 1 ; NEW_LINE dp [ 1 ] [ 2 ] = 1 ; NEW_LINE ans = getsteps ( x , y , tx , ty ) ; NEW_LINE print ( ans ) ; NEW_LINE