2025年9月28日

有旋Treap

摘要: #include<iostream> using namespace std; /*本代码模拟的是小根堆*/ const int N = 5e5+1, INF = 0x3f3f3f3f; struct node { int l, r, val, pos, siz, cnt; //val:结点的值,p 阅读全文

posted @ 2025-09-28 20:24 _CENSORED 阅读(18) 评论(0) 推荐(0)

无旋Treap(struct+指针)实现

摘要: #include <iostream> #include <tuple> using namespace std; struct node { node *l,*r; int val, pri; int cnt; int siz; node(int _val) { val = _val; siz = 阅读全文

posted @ 2025-09-28 20:24 _CENSORED 阅读(8) 评论(1) 推荐(0)

导航