pbds科普: #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; // 定义可以存储重复元素的 pbds multiset typedef tree< int, // 键类型 null_type, // 值类型(null_type 表示集合) std::less_equal<int>, // 比较函数(允许重复) rb_tree_tag, // 使用红黑树 tree_order_statist...