Блог пользователя AliHeidary1381

Автор AliHeidary1381, история, 7 лет назад, По-английски

I was getting a strange bug in my code. The buggy part of my code is the following:

1st Code

It gives the following error:

cc1plus.exe: out of memory allocating 134221823 bytes

And of course, I have 128 MB of free memory (It's more than 4 GB free).

But I thought that the problem might be from std::array, and I was right. So when I modified my code as:

2nd Code

The code compiles without any error. I am using MinGW w64 7.3.0 from here (it's exactly the codeforces's compiler, so the code get's compilation error when submitting) but other compilers haven't this problem (like CLang LLVM). Where do you think the problem is and why? And how can I solve it?

Полный текст и комментарии »

  • Проголосовать: нравится
  • +14
  • Проголосовать: не нравится