std::dequeue unusually high memory usage

Правка en1, от ArushN27, 2024-10-20 19:08:13

101911E - Painting the Fence

When I first got MLE, I suspected it might be because of #define int long long, but even after changing that I still got MLE. I couldn't figure out what was wrong as I was sure that the space was O(n).

When I used std::set instead of std::dequeue it used only 100MB memory.

std::dequeue code
std::set code

Can anybody explain why std::dequeue has such high memory usage?

Теги cpp, debugging

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский ArushN27 2024-10-20 19:14:39 0 (published)
en2 Английский ArushN27 2024-10-20 19:12:36 8 Tiny change: 'std::dequeue` it use' -> 'std::deque` it use'
en1 Английский ArushN27 2024-10-20 19:08:13 9509 Initial revision (saved to drafts)