记一些oi啸寄巧

  1. #define flog2(x) (63-__builtin_clzll(x))快速处理整数log2,在处理st表时很有用
  2. 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(其实不如手写)
  3. 一些vector的替换:rope__gnu_cxx拓展,慢一些,但是\(O(1)\)复制),basic_string(功能多一些),deque(空间占用大)
  4. 我的代码模板:
#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;
}
posted @ 2025-08-06 20:47  NotMonika  阅读(15)  评论(0)    收藏  举报