摘要: /* 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... 阅读全文
posted @ 2012-11-13 17:05 Sinker 阅读(89) 评论(0) 推荐(0) 编辑
摘要: /* ID:chenjiong PROG:zerosum LANG:C++*/#include <stdio.h>#include <string.h>#include <stdlib.h>char ans[20];int N;char tmp[9][9];int x,y;void init(){ int i; for ( i = 0; i < N; i++) ans[2 * i] = i + 1 + '0'; ans[N + N - 1] = '\0';}void pre(){ int i; tmp[x][y++] = 阅读全文
posted @ 2012-11-13 15:37 Sinker 阅读(121) 评论(0) 推荐(0) 编辑