Here is my code https://codeforces.me/contest/681/submission/91075066 for the question https://codeforces.me/problemset/problem/681/C. Can anyone help me that use of which thing is causing the MLE and which data structure should be used to avoid MLE?
Use a multiset or a priority queue. Insert and removeMin are straightforward now.
For getMin, keep on removing the smallest element and keep on incrementing the count until the removed element is smaller than the getMin output given.
If now, the multiset is empty or the smallest element in it is greater than the getMin output given increase count by 1 (it accounts for adding the getMin output given by an insert operation).