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

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

I submitted the following two codes, which are essentially the same but one gives WA, the other got accepted.

WA code

AC code

(compare the two solutions to see the differences)

UPD: Perhaps this is not something just random, repeating the submissions still gives the same verdicts. I am unsure how assertions are affecting the code.

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

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

This needs the attention of some experienced programmers. I have no clue about this.

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

You can see possible undefined behavior when choosing right compiler. What I get, submitting this code is: Probably, the solution is executed with error 'out of bounds' on the line 150.