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

unsigned int - 4 bytes and priority_queue<unsigned int> - 28 bytes
Posted by Varun Sharma 5 May 2009 17:33
Hi,

My program takes 929 Kb of memory even though I am using priority queue logic (storing only half of the elements). Assuming test #7 has 2,50,000 elements, then storing half of that as an integer means using 1,25,000 * 4 / 1024 = 488 KB.

Now since priority_queue is part of STL, I am assuming there will be some overhead so add 200 KB more to it. But still, there is a difference of around 241 KB. Where is that going ? If someone wants to look at my program I can email you. My email address is in my profile.

Thanks

Varun

Edited by author 05.05.2009 17:34