上一页 1 2 3 4 5 6 ··· 13 下一页
摘要: class Stack{private: int cur = 0; int elem[2000001];public: void push(int n); int pop(); int peek(); int size();};void Stack::push(i... 阅读全文
posted @ 2015-04-20 04:26 zmiao 阅读(151) 评论(0) 推荐(0) 编辑
摘要: Server.c#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define... 阅读全文
posted @ 2015-04-19 08:19 zmiao 阅读(253) 评论(0) 推荐(0) 编辑
摘要: http://stackoverflow.com/questions/2391679/why-do-we-need-virtual-methods-in-cBasic idea: when mark a method as virtual in a parent class, the compile... 阅读全文
posted @ 2015-04-18 16:06 zmiao 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 废话不多说,上代码:void quicksort(int x[], int lo, int hi){ int i = lo, j = hi; int pivot = x[(lo + hi) >> 1]; while(i pivot) j--; if(i <= j){... 阅读全文
posted @ 2015-03-28 08:26 zmiao 阅读(107) 评论(0) 推荐(0) 编辑
摘要: The size, isEmpty, get, set, iterator, and listIterator operations run in constant time. The add operation runs in amortized constant time, that is, a... 阅读全文
posted @ 2015-03-27 11:50 zmiao 阅读(213) 评论(0) 推荐(0) 编辑
摘要: c++里最快的io方式是什么呢?详见这里。同时给出一个比较常用的方式,就是用fread.然后自己解析文本,而不是用cin或者scanf,见这里://fast io test#include #include const int MAXS = 30* 1024* 1024;char buf[MAXS]... 阅读全文
posted @ 2015-03-25 15:26 zmiao 阅读(603) 评论(0) 推荐(0) 编辑
摘要: 传入 数组A, 以及要查找的范围[lo, hi)int binSearch(int A[], int goal, int lo, int hi){ while (lo > 1; (goal < A[mi]) ? hi = mi : lo = mi + 1; } r... 阅读全文
posted @ 2015-03-24 04:21 zmiao 阅读(114) 评论(0) 推荐(0) 编辑
摘要: some books describe pumping lemma as this:LetLbe a regular language. Then there exists an integerp≥ 1 depending only onLsuch that every stringwinLof l... 阅读全文
posted @ 2015-02-28 05:32 zmiao 阅读(229) 评论(0) 推荐(0) 编辑
摘要: 1, Iteration, Induction and Recursion2, the running time of program3, combinatorics and probability4, the tree data model5, the list data model6, the ... 阅读全文
posted @ 2015-01-10 16:12 zmiao 阅读(192) 评论(0) 推荐(0) 编辑
摘要: http://programmers.stackexchange.com/questions/83780/how-fast-can-go-goIn terms of language design, there isn't really anything that should make Go sl... 阅读全文
posted @ 2015-01-09 09:05 zmiao 阅读(734) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 13 下一页