搜索
文章平均质量分 52
我爱AI_AI爱我
不爱
展开
-
lower_bound,upper_bound -- from LiuRujia(待完善)
int upper_bound(int *A,int x,int y,int v){ int m; while(x < y) { m = x + (y - x) / 2; if( A[m] <= v) { x = m + 1; } else y原创 2016-07-13 10:58:51 · 334 阅读 · 0 评论 -
lower_bound upper_bound源代码,以及小于等于关键词最大的数的位置
#include #include #include using namespace std; struct T { int bg,ed,v; int sum; bool operator { if(ed == x.ed) { return bg > x.bg;原创 2016-06-20 17:06:54 · 2678 阅读 · 0 评论 -
树上dfs + 思维
the number lamp ai, it is hanging on (and 0, if is there is no such lamp), 表示的是祖先的序号原创 2017-02-21 20:20:54 · 582 阅读 · 0 评论