标签:
input | output |
---|---|
212 |
995645335 |
//0.062 2 190 KB #include<stdio.h> #define ll long long ll dp[507][507]; int main() { dp[0][0]=1; for(int i=1;i<=500;i++) for(int j=1;j<=i;j++) for(int k=0;k<j;k++) dp[i][j]+=dp[i-j][k]; int n; while(scanf("%d",&n)!=EOF) { ll ans=0; for(int i=1;i<n;i++) ans+=dp[n][i]; printf("%lld\n",ans); } return 0; }
标签:
原文地址:http://blog.csdn.net/crescent__moon/article/details/42835025