标签:
7
14
#include<iostream> #include<cstdio> #include<string> #include<cstring> #include<algorithm> using namespace std; unsigned int n,dp[4005][4005],ans,mod = 2147483648; int main(){ cin>>n; dp[0][0] = 1; for(int i = 1;i <= n;i++){ for(int j = i;j <= n;j++){ dp[i][j] = (dp[i-1][j-1] + dp[i][j-i]) % mod; if(i > 1 && j == n) ans = (ans + dp[i][j]) % mod; } } cout<<ans; return 0; }
标签:
原文地址:http://www.cnblogs.com/hyfer/p/5754689.html