ArushN27's blog

By ArushN27, history, 6 weeks ago, In English

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::deque it used only 100MB memory.

std::deque code
std::set code

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

Full text and comments »

  • Vote: I like it
  • +23
  • Vote: I do not like it