옵션 |
|
1 2 3 4 5 6 7 8 9 10 | long long int choose2 (int n, int r) { if(memo[n][r]>0) return memo[n][r]; if(r==0 || n==r) return memo[n][r]=1; return memo[n][r] = choose2(n-1, r-1)+choose2(n-1,r); } | cs |