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

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

I'm trying to solve problem 18A (18A - Triangle) at the moment, but for some reason i get RUNTIME ERROR on test 2 even though my code works perfectly fine both in VS Code and GDB online compiler. I have no idea what could be wrong and codeforces doesn't give me any hints. Any suggestions?

Here is my submission: 112722655

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

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

Mmmm not sure, but be carefully don't acces an invalid index in the array, sometimes our compilers have a strange behavior and cf is strictly, again not sure maybe the mistake is another thing

Good luck men!

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

You are accessing the index out of bound coo[i+3],coo[i-3] you can set condition for that if (i<3) coo[i+3]... if (i>2) coo[i-3]...