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

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

Can somebody please help me, I was solving 626F - Group Projects and my submission got verdict runtime error and exit code: -1073741819 (STATUS_ACCESS_VIOLATION). I tried to run code with failing test on my computer, but everything worked correctly. I tried to solve this problem using custom invasion and when I added int aa=i+j+l; into the code then my code passed 2 more test and then got the same verdict. I also read over my code many times but I didn't find the source of this issue.

submissions: 258157425, 258157468 I also have some submissions under a private group, but they are all basically the same.

Does somebody know the source of this issue and how to fix it?

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

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

$$$a$$$ size is n

you have a[i+1] inside a loop

if $$$i$$$ is $$$n-1$$$ you will try to take value out of $$$a$$$ bounds which is undefined behaviour