Codeforces и Polygon могут быть недоступны в период с 6 декабря, 22:00 (МСК) по 7 декабря, 00:00 (МСК) в связи с проведением технических работ. ×

Why am I getting out of bounds error?

Правка en1, от CandidFlakes, 2023-08-21 19:13:23

Please look at this submission. I am getting out of bounds error on line number 42. I have checked my code multiple times and also made sure that the vector 'a' is accessed up to i=a.size()-2 only, so that a[i+1] doesn't go out of bound.

Please help me identify my mistake.

I will be thankful for any help!

Теги runtime error, mysterious runtime error, out of bound, out of bounds

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский CandidFlakes 2023-08-21 19:13:23 412 Initial revision (published)