| 记录编号 | 445865 | 评测结果 | AAAAAAA | 
    
        | 题目名称 | 684.集合平分 | 最终得分 | 100 | 
    
        | 用户昵称 |  Hyoi_ctime | 是否通过 | 通过 | 
    
        | 代码语言 | C++ | 运行时间 | 0.003 s | 
    
        | 提交时间 | 2017-09-06 21:55:04 | 内存使用 | 0.47 MiB | 
    
    
    
    		显示代码纯文本
		
		#include<iostream>
#include<cstdio>
#include<vector>
#include<cmath>
#include<algorithm>
using namespace std;
const int maxn=40;
int f[maxn][1000], n;
inline void read()
{ 
    scanf("%d",&n);
    f[1][1]=1;
    for(int i=2;i<=n;i++){ 
        int temp=(i*(i+1))>>1;
        for(int j=0;j<=temp;j++){ 
            f[i][j+i]+=f[i-1][j];
            f[i][abs(j-i)]+=f[i-1][j];
        }
    }
    printf("%d\n",f[n][0]);
}
int main()
{
	freopen("subsetz.in","r",stdin);
    freopen("subsetz.out","w",stdout);
	read();
	return 0;
}