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 1220. Stacks

#MLE 14
Posted by LaVuna [NULP] 19 Aug 2020 20:46
How to solve this problem using c++ ? My pick is  #MLE 14. I use (10^5 + 1000)*4 + 10^5 * 2
 = 589,84375 kilobytes of memory. I have no idea how to optimize it even more(

Edited by author 20.08.2020 02:34

Edited by author 20.08.2020 02:34
hint
Posted by LaVuna [NULP] 21 Aug 2020 01:11
I solved this problem. I can only suggest you to think about headers.In this problem this cost a lot. To save memory,you must count total amount of bits that you need and use nearly that amount of space. Use bitwise operators to write and read numbers.

Edited by author 21.08.2020 01:15