(1-1-1)
int Kaijo(int n){
if(n < 1) {
return 1;
}else{
return n * Kaijo(n-1);
}
}
(1-1-2)
int Count1(int i, int j){
return Kaijo(i+j)/(Kaijo(i)*Kaijo(j));
}
int Count2(int i, int j){
if(i==0 || j==0){
return 1;
}else{
return route(i-1, j) + route(i, j-1);
}
}
20, 15, 35
int Count3(int I, int J, int i0, int j0, int i1, int j1){
return Count1(I, J) - Count1(i0, j0) * Count1(i1 - i0, j1 - j0) * Count1(i1, j1);
}