Power Update After K-th Largest Insertion II
Insert each value into a sorted list, pick the k-th largest element with duplicates counted, and raise p to that power modulo 1000000007.
Insert each value into a sorted list, pick the k-th largest element with duplicates counted, and raise p to that power modulo 1000000007.