int uniquePaths(int m, int n){
if(m==1){
return 1;
}
if(n==1){
return 1;
}
int a[m][n];
a[0][0]=0;
a[0][1]=1;
a[1][0]=1;
for(int b=0;b<m;b++){
for(int c=0;c<n;c++){
if(!(b==0&&c==0)&&!(b==0&&c==1)&&!(b==1&&c==0)){
if(b-1<0){
a[b][c]=a[b][c-1];
}
else if(c-1<0){
a[b][c]=a[b-1][c];
}
else{
a[b][c]=a[b-1][c]+a[b][c-1];
}
}
}
}
return a[m-1][n-1];
}
03-09
389
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
06-24
198
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
02-23
1182
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-06
124
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-20
513
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)