minimum matrix path sum, 2d dp