TLE on a codechef problem (MCHEF) using multiset.

Revision en1, by ananth94, 2015-07-20 09:37:32

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.

Tags multiset, codechef, tle

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English ananth94 2015-07-20 09:37:32 651 Initial revision (published)