ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1306. Sequence Median

I used priority_queue<unsigned int>, but still got MLE. Help me !!
Posted by Cabbage 16 Sep 2015 16:42
Here is my code. I used the technics as described by others, but it still won't work.
//Code deleted.

Edited by author 17.09.2015 12:29
Re: I used priority_queue<unsigned int>, but still got MLE. Help me !!
Posted by Cabbage 17 Sep 2015 12:31
OK, I get that by myself. I've deleted the code I put here before. I implemented a binary heap by myself, and used it to pass the problem. It worked.
Re: I used priority_queue<unsigned int>, but still got MLE. Help me !!
Posted by xuantung 23 Dec 2015 13:17
Cabbage,can you give me your code?I can't solve this MLE problem.:(.My email is xuantungptit@gmail.com
Re: I used priority_queue<unsigned int>, but still got MLE. Help me !!
Posted by nadinne 6 Feb 2016 04:28
I got MLE too! But then I used vector and got AC.
Instead of priority_queue try to use vector and algorithms: make_heap, push_heap, pop_heap, sort_heap. In some topic here I saw  detailed information on this solution which helped me to get AC.