![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
线段树
turtlew
这个作者很懒,什么都没留下…
展开
-
HDU1166
线段树入门原创 2016-03-15 16:49:31 · 367 阅读 · 0 评论 -
...
POJ 3468 线段树的成段更新加延迟标记#include<string.h>#include<iostream>#include<algorithm>#include<stdio.h>using namespace std;typedef long long LL;const int MAXN=111150;struct Node{ int l,r; LL v原创 2016-03-17 22:44:50 · 291 阅读 · 0 评论 -
文章标题
http://www.cnblogs.com/YY56/p/5452674.html 从这学来的一个新姿势=_= 对原数组val离散化然后对离散化后的数组Hash排序,还要去重。 然后按顺序对原数组val按顺序进行一次Query和update,查找原数组val元素的过程用二分处理Hash。 因为Hash是按顺序排的所以每次Query都是查询1-(x-1)的区间和。 然后当前点的值更新为1-原创 2016-05-02 20:05:13 · 245 阅读 · 0 评论 -
MDZZ
给一个大小是n,1<=ai<=n的数组,求max(ai%aj,i#include <cstdio>#include <cstring>#include <cmath>#include <queue>#include <vector>#include <string>#include <stack>#include <set>#include <map>#include <iostr原创 2016-10-14 02:16:56 · 575 阅读 · 0 评论