What Undefined Behaviour am I triggering over here?

Правка en1, от sbansal1999, 2022-10-08 15:07:16

The Problem is this. I made some naive solution which got AC, then I optimized my solution using vectors and I am getting one solution getting WA in C++17 and the same one getting AC in C++20.

AC in C20 175129943

WA in C17 175130535

I for sure know that I am triggering some undefined behavior here or else this wont happen. Maybe its the equality check of vectors using the == operator. But I am not sure.

Thanks.

Теги codeforces, undefined behavior, c++20, c++17

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский sbansal1999 2022-10-08 15:07:47 5 Tiny change: ' operator. But I am n' -> ' operator.\n\nBut I am n'
en1 Английский sbansal1999 2022-10-08 15:07:16 556 Initial revision (published)