#define flog2(x) (63-__builtin_clzll(x))快速处理整数log2,在处理st表时很有用
- pbds
- 平衡树
typedef tree<T,null_type,less<T>,rb_tree_tag,tree_order_statistics_node_update> tree;
- 哈希表(比unordered_map快)
gp_hash_table cc_hash_table
- trie(其实不如手写)
- 一些
vector的替换:rope(__gnu_cxx拓展,慢一些,但是\(O(1)\)复制),basic_string(功能多一些),deque(空间占用大)
- 我的代码模板:
#include<bits/stdc++.h>
#include<bits/extc++.h>
using namespace std;
using namespace __gnu_cxx;
using namespace __gnu_pbds;
namespace just{
void monika(){
}
}
int main(){
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
just::monika();
return 0;
}