摘要: 预处理时间复杂度为O(nlogn),查询时间复杂度O(1) #include<bits/stdc++.h> using namespace std; #define IOS ios::sync_with_stdio(0);cin.tie(0);cout.tie(0); typedef long lo 阅读全文
posted @ 2021-04-11 15:02 七铭的魔法师 阅读(50) 评论(0) 推荐(0) 编辑
摘要: 大部分情况直接套优先队列就可以了的说,先附上优先队列 priority_queue<int,vector<int>,less<int> > maxheap;//大根堆,不写第二个第三个参数默认以vector<int>作容器的大根堆 priority_queue<int,vector<int>,gre 阅读全文
posted @ 2021-04-11 14:15 七铭的魔法师 阅读(344) 评论(0) 推荐(0) 编辑