andre_joy

导航

2012年11月7日

USACO crypt1

摘要: 题意:给出1~9里面的一些数字,按题目所给公式填入这些数字使得结果成立,求有多少种组合方式。mark:简单的枚举。我的代码比较暴力,可以用数组的形式简化。。。代码:/*ID: andre_j2LANG: CTASK: crypt1*/#include <stdio.h>#include <stdlib.h>#include <string.h>int n;int a[15];int tem1,tem2,tem3,cnt;int find(int m){ int i; for(i = 0; i < n; i++) if(a[i] == m) return 阅读全文

posted @ 2012-11-07 09:34 andre_joy 阅读(189) 评论(0) 推荐(0) 编辑