kl0989e's blog

By kl0989e, history, 8 months ago, In English

Can somebody please help me, I was solving 626F - Групповые проекты 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?

  • Vote: I like it
  • +14
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it +1 Vote: I do not like it

$$$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

  • »
    »
    8 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Thank you. Now everything works and I got AC.