树
你的目光看海
这个作者很懒,什么都没留下…
展开
-
数组建立二叉搜索树
最近学习了一下用数组建立二叉搜索树,感觉自己又提高了一点点,好高兴!下面写个模板,功能是: 输入 n , 接下来输入 n 个数,建立二叉搜索树。#include <iostream> #include <algorithm> #include <cstdio> #include <cstdlib> #include <cstring> using namespace std;int arr[100原创 2016-07-12 17:41:19 · 2895 阅读 · 0 评论 -
玲珑oj 1129
链接 一道经典的线段树的题 , 注意下 query 的处理就好了 , 用到了 lazy , 算是自己复习了一遍线段树。#include <bits/stdc++.h> #define sc scanf #define pr printf const int N = 100010; using namespace std; long long tree[N<<2],lazy[N<<2];void p原创 2017-05-30 22:10:22 · 387 阅读 · 0 评论