#include using namespace __gnu_pbds; template using Tree = tree, rb_tree_tag, tree_order_statistics_node_update>; // T.order_of_key(x): number of elements strictly less than x // *T.find_by_order(k): k-th element constexpr uint64_t RNG = ll(2e18 * acos(-1)) | 199; // random odd template struct chash { size_t operator()(T o) const { return __builtin_bswap64(hash()(o) * RNG); }}; template using hashMap = gp_hash_table>; template using hashSet = gp_hash_table>;