Hi everyone,
i was trying to do Moscow Subregional yesterday (at Codeforces Gym) and got stuck at problem K (The Top K Elements). After some thinking, all i could get is an O(n) approach, n<=10^8, which "apparently", or maybe certainly, leads to TLE. Could someone give me a hint on this problem?
Thanks.