摘要:
/* ID:chenjiong PROG:money LANG:C++*/#include <stdio.h>#include <string.h>int V,N;int m[30];int sum;long long cnt;void dfs(int cur,int s){ if ( sum > N ) return; if ( sum == N ) { cnt++; return; } int i; for ( i = s; i < V; i++) { sum += m[i... 阅读全文
摘要:
don't get accustomed to thinking of problems in a complicated way./* ID:chenjiong PROG:preface LANG:C++*/#include <stdio.h>#include <string.h>char* table[4][9] = { {"I","II","III","IV","V","VI","VII","VIII&quo 阅读全文
摘要:
/* ID:chenjiong PROG:subset LANG:C++*/#include <stdio.h>#include <string.h>const int MAXN = 40;int N;int set[MAXN];int sum;int cnt;void init(){ int i; scanf("%d",&N); for ( i = 0; i < N; i++) set[i] = i + 1;}void dfs(int cur){ if ( cur == N ) { if ( sum == N * (... 阅读全文