#include
using namespace std;
long SortConbine(int m, int n)
{
//创建杨辉三角矩阵并初始化
long** temp = new long*[m + 1];
for (int i = 0; i <= m; i++)
temp[i] = new long[m + 1];
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= m; j++)
temp[i][j]=0;
}
//根据杨辉三角计算排列组合问题
temp[0][0] = 1;
for (int i = 1; i <= m; i++) {
temp[i][0] = 1;
for (int j = 1; j <= m; j++) {
temp[i][j] = (temp[i – 1][j – 1] + temp[i – 1][j]) % mod;
}
}
for (int i = 0; i <= m; i++) {
for (int j = 0; j <= m; j++)
cout << temp[i][j] << ‘\t’;
cout << endl;
}
return temp[m][n];
}