#include #include #include using namespace std;
vector< vector > a;
int step(int n, int k){ //cout << n << " " << k << endl; if((n == 0) || (k == 0) || (n == k)) return 1; long long int tmp1, tmp2;<br> if(a[n - 1][k - 1] == 0) a[n - 1][k - 1] = step(n - 1, k - 1); tmp1 = a[n - 1][k - 1]; if(a[n - 1][k] == 0) a[n - 1][k] = step(n - 1, k); tmp2 = a[n - 1][k];
return tmp1 + tmp2;}
int main(void){ int n, k; cin >> n >> k;
a.resize(n); for(size_t j = 0; j < a.size(); j++) for(size_t i = 0; i < n; i++) a[j].push_back(0);
cout << step(n, k) << endl;}<span>