> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0063_unique_paths_ii/slt.md).

# 思路1 dp

同上一题，如果i,j是障碍，则dp\[i]\[j]为0。

这道题有一种很好的处理边角特殊情况的方法，即我们申请一个m+1,n+1的二位数字，\[1]\[1]作为起始点\[m+1]\[n+1]最为终点。这样很好的处理了边上有障碍的情况。

dp\[1]\[1]作为起始点一定是1。所以开始设置`dp[0][1]=1`或`dp[1][0]=1`都可以。

另外dp用int还会溢出，所以用long long
