problem
solution
codes
#include<iostream>
using namespace std;
int n, m, f[210][10];
int main(){
cin>>n>>m;
n-=m;
for(int i = 0; i <= n; i++)f[0][i]=f[i][1]=1;
for(int i = 1; i <= n; i++)
for(int j = 2; j <= m; j++)
f[i][j] = j>i?f[i][i]:f[i][j-1]+f[i-j][j];
cout<<f[n][m]<<"
";
return 0;
}
#include<iostream>
#include<algorithm>
using namespace std;
int n, k, f[210][10];
int main(){
cin>>n>>k;
f[0][0] = 1;
for(int i = 1; i <= n; i++)
for(int j = 1; j <= min(i,k); j++)
f[i][j] = f[i-j][j]+f[i-1][j-1];
cout<<f[n][k];
return 0;
}