rt,用一个vector存,每输入一个数,就用upper_bound找插入的位置,用insert插入。时间复杂度 O(nlogn)O(n\log n)O(nlogn),但常数会大一些。
vector
upper_bound
insert