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

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

I was solving this 520B - Две кнопки problem. Here maximum input and output size is 10^4. In my code I took N = 10^6 and it was giving Runtime Errorin my local IDE but when I submitted the same code, it got accepted. My submission 116080580. I dont know whether it's a fault of my device or the compliler I am using. Can anyone help??

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

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

It's a memory stack size issue. I had a similar problem here https://mirror.codeforces.com/blog/entry/68870

»
5 лет назад, скрыть # |
 
Проголосовать: нравится 0 Проголосовать: не нравится

This is clearly a problem with stack size, but it's difficult to help without knowing what OS are you using. If you're using Linux, you can disable stack limit using ulimit -s unlimited.

  • »
    »
    5 лет назад, скрыть # ^ |
     
    Проголосовать: нравится 0 Проголосовать: не нравится

    My OS is windows 10. I dont find any similar method for windows like Linux has but there is a setting in CodeBlocks IDE which can increase the stack size. But it is only restricted to CodeBlocks. Usually I use sublime text 3 and for that things are same as before... RTE