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

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

Can anyone please explain why this submission 54494363 got Runtime error_ ( used long long int)_ while this submission 54494589 was Accepted.__(used int)__.

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

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

It's a stack-overflow error.

And because of the fact that sizeof(long long int) == 2 * sizeof(int)), int was enough to solve the problem.

BTW, if you declared the arrays globally, you would take an MLE verdict.

Sources: https://stackoverflow.com/questions/216259/is-there-a-max-array-length-limit-in-c