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

Автор askd, история, 3 года назад, По-английски

Hey everyone!

I encountered a very strange RE today on 1270F - Awesome Substrings.

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

»
3 года назад, # |
  Проголосовать: нравится +21 Проголосовать: не нравится

According to https://mirror.codeforces.com/blog/entry/79 blog, GCC is used with -Wl,--stack=268435456 option. Which increases the stack size limit to 256M, up from a rather small default.

The 512M memory limit for that particular problem is there for the combined stack+heap size. The stack is still limited to 256M regardless. Moreover, you are very much lucky and privileged as a C++ user. Many of the other programming languages on the codeforces platform have ridiculously small stack sizes, which makes implementing deep recursive algorithms difficult.