求一篇简单易懂的珂朵莉树博客
  • 板块灌水区
  • 楼主sycqwq
  • 当前回复17
  • 已保存回复17
  • 发布时间2021/10/14 19:23
  • 上次更新2023/11/4 03:49:38
查看原帖
求一篇简单易懂的珂朵莉树博客
151647
sycqwq楼主2021/10/14 19:23

rt

主要是代码简单易懂

萌新有一些代码看不懂

比如说这个


struct Node_t {
  int l, r;
  mutable int v;
  Node_t(const int &il, const int &ir, const int &iv) : l(il), r(ir), v(iv) {}//这一行
  inline bool operator<(const Node_t &o) const { return l < o.l; }
};

或者这个:

set<Node>::iterator split(int pos){
	set<Node>::iterator it = st.lower_bound(Node(pos));
	if (it != st.end() && it->l == pos) return it;//这个“->”的操作
	--it; Node tmp = *it; st.erase(it);
	st.insert(Node(tmp.l, pos - 1, tmp.val));
	return st.insert(Node(pos, tmp.r, tmp.val)).first; //first return iterator
}

巨佬们也可以用简洁的语言讲一下这些东西的意思,太过专业看不懂awa

最好可以讲一下等价于什么

2021/10/14 19:23
加载中...