#include <iostream> using namespace std; #define MAXN 100 void dfs(int pi,int curSum,bool res[],int n,int half,int &num,int left[]) { for(int i=pi+1;i<=n;i++) { res[i]=true; if(curSum+left[i]=1;i--) left[i]=i+left[i+1]; dfs(0,0,res,n,half,cnt,left); return cnt; } int main() { int n=20; int num=cal_num(n); printf("num=%d\n",num); return 0; }