#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
#define TREE_NODE ll
#define ordered_set tree<TREE_NODE, null_type, less<TREE_NODE>, rb_tree_tag, tree_order_statistics_node_update>
// 중복이 있을 때 less<TREE_NODE> 이면 첫 원소, less_equal<TREE_NODE> 이면 마지막 원소
{
ordered_set X;
*X.find_by_order(x);
X.order_of_key(x);
}
codeforces.com/blog/entry/11080
C++ STL: Policy based data structures - Codeforces
codeforces.com
gcc.gnu.org/onlinedocs/libstdc++/manual/policy_data_structures_design.html
Design
Hash-tables are unfortunately especially susceptible to choice of policies. One of the more complicated aspects of this is that poor combinations of good policies can form a poor container. Following are some considerations. Some combinations do not work w
gcc.gnu.org