Hello Codeforces community! I recently took part in the July 2015 long challenge on www.codechef.com . There was a problem called Masterchef( Problem code: MCHEF). I used a multiset as a priority queue to calculate the minimum cost for each dish. In the author's solution, they used a set instead of a multiset. The complexities are the same but my solution TLEs for the second subtask. Could someone please help me out here?
This is my solution: https://www.codechef.com/viewsolution/7352429 This is the editorial: http://discuss.codechef.com/questions/71856/mchef-editorial
Thanks in advance.