摘要: #include #include #include #include #include #define NOT_FOUND -1 using namespace std; const int maxn=10007; int n, k, a[maxn]; int Binary_Search() { int left=1; int right=n; while(left ... 阅读全文
posted @ 2017-03-31 19:56 爱记录一切美好的微笑 阅读(104) 评论(0) 推荐(0) 编辑
摘要: #include #include #include #include #include using namespace std; const int maxn=10007; int n, k, a[maxn]; int Order_Search() { int i; for(i=n; i>0&&a[i]!=k; i--); return i; } int main... 阅读全文
posted @ 2017-03-31 19:40 爱记录一切美好的微笑 阅读(93) 评论(0) 推荐(0) 编辑
摘要: http://acm.nyist.net/JudgeOnline/problem.php?pid=35 阅读全文
posted @ 2017-03-31 17:32 爱记录一切美好的微笑 阅读(118) 评论(0) 推荐(0) 编辑
摘要: http://acm.hdu.edu.cn/showproblem.php?pid=1237 阅读全文
posted @ 2017-03-31 17:31 爱记录一切美好的微笑 阅读(137) 评论(0) 推荐(0) 编辑
摘要: #include #include typedef int ElemType; enum Status { OK = 1, NOT_FOUND = 2, ERROR = 3 }; struct LinkListNode { LinkListNode():pre(NULL), next(NULL) {} ElemType data;... 阅读全文
posted @ 2017-03-31 17:30 爱记录一切美好的微笑 阅读(154) 评论(0) 推荐(0) 编辑