Approach hintTry it first, then revealHide
Let dp[i][j] count the ways to reach cell (i, j): an obstacle cell holds zero and every other cell adds the counts from above and from the left. An obstacle in the first row or column blocks every cell after it.