- 博客(3)
- 资源 (10)
- 收藏
- 关注
原创 金山招聘题目:编程计算从1到2008080808之间的整数有多少个含有数字7
我的代码(如果要加一个模板参数来判断n和last是否相等,会有意想不到的效果):#include using namespace std;const int MAX = 2008080808;const int IT = 7;templateint n, int curr, int last, int base, int weight>class A{ enum{it = n/b
2008-06-15 21:00:00 7633 14
原创 化循环为递归的算子
//by baihacker #include #define MAKE_OPERATOR(result, ptype, name) result * name(result* (*action)(result *, ptype), result * it, ptype p, int n){return n--?(name(action, it, p, n)
2008-06-15 20:57:00 2413 1
原创 用递归写的大数运算
//by baihacker 用递归写的大数运算 #include typedef struct BigNum_{ int data[256]; int n;} BigNum;BigNum* carry(BigNum* bn, int curr, int valid, int inc){ return curr>=valid && inc ? (++bn->n,
2008-06-15 16:19:00 3225
二叉查找树代码(avl,bst,rbt,sbt,splay,treap树)
2013-06-29
Windows程序设计
2007-12-23
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人