Raks_splunk's blog

By Raks_splunk, history, 22 months ago, In English

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

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

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
22 months ago, # |
  Vote: I like it +5 Vote: I do not like it

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