神秘pbds知识

引入头文件

#include<bits/extc++.h>
using namespace __gnu_pbds;

内置平衡树

tree<pii,null_type,less<pii>,rb_tree_tag,tree_order_statistics_node_update>T;
T.insert();//插入
T.erase();//删除
T.order_of_key({pii});//返回多少个元素比该元素小
T.find_by_order(x-1);//返回从小到大排列后,排名为x的元素
T.lower_bound({pii});//返回第一个小于等于该元素的元素的迭代器
T.upper_bound({pii});//...
//可使用it--,it++,begin(),end()
posted @ 2025-08-12 21:40  Marinaco  阅读(11)  评论(0)    收藏  举报
//雪花飘落效果