This documentation is automatically generated by competitive-verifier/competitive-verifier
#pragma once
#include "algo/common.h"
#ifndef PREPROCESS
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#endif
namespace algo::ds {
/*
* find_by_order(k) - returns iterator to kth largest element (0-indexed) or an
* iterator to end if it doesn't exist
*
* order_of_key(x) - returns the number of elements in the set strictly smaller
* than x
*/
template <typename T>
using ordered_set =
__gnu_pbds::tree<T, __gnu_pbds::null_type, std::less<T>,
__gnu_pbds::rb_tree_tag,
__gnu_pbds::tree_order_statistics_node_update>;
} // namespace algo::ds
#line 2 "algo/common.h"
#ifndef PREPROCESS
#include <bits/stdc++.h>
#include <cassert>
#endif
namespace algo {
// Indices and sizes into library containers. Signed, so the usual "walk down to
// -1" loops still terminate; widening the whole library is a change here alone.
using index_t = int;
} // namespace algo
#line 3 "algo/ds/pbds.h"
#ifndef PREPROCESS
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#endif
namespace algo::ds {
/*
* find_by_order(k) - returns iterator to kth largest element (0-indexed) or an
* iterator to end if it doesn't exist
*
* order_of_key(x) - returns the number of elements in the set strictly smaller
* than x
*/
template <typename T>
using ordered_set =
__gnu_pbds::tree<T, __gnu_pbds::null_type, std::less<T>,
__gnu_pbds::rb_tree_tag,
__gnu_pbds::tree_order_statistics_node_update>;
} // namespace algo::ds