Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include"base/dependencies/index.hpp"
- // Representation of the absence of a type, useful for template tricks.
- using none=PBDS::null_type;
- // Priority queue type alias.
- template<class Type,class Comp=greater<Type>>
- using pqueue=priority_queue<Type,vector<Type>,Comp>;
- // Indexable red-black tree type alias.
- template<class Key,class Val=none,class Comp=less<Key>>using rbtree=PBDS::tree<
- Key,Val,Comp,PBDS::rb_tree_tag,PBDS::tree_order_statistics_node_update
- >;
- // Unordered set type alias.
- template<class Key,class Hash=hash<Key>>using uset=unordered_set<Key,Hash>;
- // Unordered map type alias.
- template<class Key,class Val,class Hash=hash<Key>>
- using umap=unordered_map<Key,Val,Hash>;
- // Hash table type alias.
- template<class Key,class Val=none,class Hash=hash<Key>>
- using htable=PBDS::gp_hash_table<Key,Val,Hash>;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement