( height , width ) pairs
a = [ [ 1 , 5 ] , [ 2 , 4 ] , [ 1 , 1 ] , [ 3 , 3 ] ] NEW_LINE N = 10 NEW_LINE dp = [ [ - 1 for i in range ( N ) ] for j in range ( N ) ] NEW_LINE n = len ( a ) NEW_LINE print ( getLongest ( a , n ) ) NEW_LINE