- 博客(7)
- 资源 (8)
- 收藏
- 关注
转载 线段树模板
#include #include #include using namespace std; const int SIZE = 10010; struct node // the node of line tree { int i,j; // 区间范围 node * lson; node * rson; int count; // 线段覆盖条数
2013-03-30 16:39:33 787
原创 hdu1195 Open the Lock
题目的意思是密码锁开锁的意思 用光搜写的: #include #include #include #include #include #include using namespace std; class NODE { public: NODE(){}; NODE(const NODE &aa) { step=aa.step; cur=aa.cur; for(in
2013-03-28 12:22:53 783
原创 判断两个数是否为素数的递归法
bool a_b_prime(int u,int v) { int c; while(v) { c=u%v; u=v; v=c; } if(u==1) return true; return false; }int prime(int a, int b) //网上发现的递归 { return (b == 0)? (a == 1) : prime(b, a % b
2013-03-26 19:33:44 1990 2
原创 HDU 1010 Tempter of the Bone(DFS+奇偶剪枝)
第一次用奇偶剪纸,记录一下吧 #include #include #include #include #include using namespace std; class NODE { public: NODE(int x,int y,int times):x(x),y(y),times(times){}; NODE(){}; NODE(cons
2013-03-26 18:57:42 783
原创 hdu 1015 Safecracker
就是一个组合数的方式 #include #include #include #include using namespace std; int len; long long m; string str; int p[22]; int targ[10]; char targ2[10]; bool visited[22]; long long pows(int a,int b) { lon
2013-03-26 18:54:13 760
原创 二分查找
#include #include #include #include using namespace std; const int MAX =110; int yao[MAX]; int erfen1(int left,int right,int x) //二分递归实现 { if(left>right) return -1; int middle=(left+right)/
2013-03-16 02:25:45 828
原创 递归二叉树的建立于遍历
递归实现二叉树的建树和遍历 #include #include #include using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define MAXSIZE 100 typedef int Status; typedef int Elemetype; typedef struct BiNode { E
2013-03-07 11:31:35 880
Listary pro 4.01 能用的破解版
2015-05-19
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人