Kavi1234's blog

By Kavi1234, history, 6 years ago, In English

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

  • Vote: I like it
  • -3
  • Vote: I do not like it

| Write comment?
»
6 years ago, # |
  Vote: I like it +5 Vote: I do not like it

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