This is my submission(
[1]) for CHBLLNS([link][2]) problem.
The solution is O(1).
The submission takes 0.00 time but <b>15.7M</b> memory.
Previously when I submitted O(1) codes in C++14, it hardly took any memory. Took maybe around <b>3.2M</b> or something.
Why is the memory difference, Is there any change in memory allocation policy?
Obviously it wont affect codes taking smaller memory to execute, but codes including Segment tree, Persistent data structures or HLD would take a lot of memory, if scaled by this submission, and may give SIGSEV.
I have been observing this memory increase for a past week or so. Curious to know why this happens!
[1]: https://www.codechef.com/viewsolution/14689360
[2]: https://www.codechef.com/problems/CHBLLNS