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

Автор Raks_splunk, история, 22 месяца назад, По-английски

Getting this error when submitting the solution: https://codeforces.me/contest/1713/submission/189032860

VScode gives the correct answer without any errors. Is there any way I can fix this?

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

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

You have pre-defined the size of the vector... Maybe for larger number of testcases, your variable 'a' is getting a value which is greater than the range set by you for indexing so it is showing out of bounds. If you are confident enough with the logic of your code then you may try increasing the range of the vector once and then check...