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

Автор blitzkrieg639, история, 6 лет назад, По-английски

Hello everyone, can somebody please tell if there is some issue with the recently added GNU G++17 9.2.0(64 bit, msys 2) compiler? Because it costed me 3 wrong submissions and 10 minutes of time in yesterday's contest. I was submitting the code to the 2nd answer and it gave me WA 3 times, before I changed the compiler to GNU G++17(7.3.0) and it got accepted.

And this is not the first time, this has happened quite a lot of times.

Hence, I wanted to know, if something needs to be imparted into my code, before submitting using that compiler or is it just because of that compiler. Thank you, in advance!

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

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

if (*lower_bound(a, a + n, x) == x)

I think this is undefined if lower_bound() returns a+n.