MinPathSum a/c