unique paths ii, dynamic programming