标签:dp
斯特灵数:把
有递推关系式:
#include <cstdio>
#include <iostream>
#include <cstring>
#include <algorithm>
using namespace std;
const int M = 1009, INF = 0x3fffffff;
int n, m, dp[M][M];
int main(void) {
while(cin >> n >> m) {
dp[0][0] = 1;
for(int i = 1; i <= m; i++) {
for(int j = 0; j <= n; j++) {
dp[i][j] = (j >= i ? dp[i][j - i] : 0) + dp[i - 1][j];
}
}
}
return 0;
}
标签:dp
原文地址:http://blog.csdn.net/jibancanyang/article/details/45094275