- 博客(3)
- 收藏
- 关注
原创 POJ3159 Candies
CandiesTime Limit: 1500MSMemory Limit: 131072KDescriptionDuring the kindergarten days, flymouse was the monitor of his class. Occasionally the head-teacher brought the kids of flymouse’s class a large bag of candies and had flymouse distribute them. Al
2021-02-01 23:16:28
208
原创 对线段树的理解
线段树是一棵二叉树,每个节点存储了区间的左端点,右端点,和对应区间上的某个数据(如果使用延迟更新,还有相应的懒惰标记)维护区间和的线段树(更新操作只有区间加)(洛谷P3372)#include <bits/stdc++.h>#define MAXN 100005#define LEFT(i) ((i) << 1)#define RIGHT(i) ((i) << 1 | 1)using namespace s
2020-12-27 14:05:53
134
原创 洛谷P3369 AVL树
对洛谷题解上的代码进行了小小的修改,并添加了自己的注释#include <bits/stdc++.h>using namespace std;struct AVLnode { // 数据 int data; // 节点高度 int high; // 相同数据的个数 int freq; // 树的大小 int size; // 左子节点 AVLnode *ls; // 右子节点 AVLnode *
2020-12-20 13:11:50
564
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人