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

Автор IGrenadiers, история, 3 года назад, По-английски

The contest held on 20th September 2021 , Educational Round 114 , Division 2 20:05 UTC+5:30 had a serious compiler issue I was solving problem C Educational Round 114 Div 2 Problem C , and I had the following code for it :

My Code

Codeblocks Compiler and ideone.com show the same output and the correct answer for the sample testcase but the codeforces for some reason calculates lower bound of 4 to be 6 ? Since I might be wrong that's why I would be glad if someone could confirm this thank you.

MikeMirzayanov can you look into this for once please ? its been multiple times this has happened not in contest but practice submissions as well

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

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

Maybe some undefine behaviour? I have this once when I use getchar

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

I am not sure about the lower bound issue, but if idx=v.size()-1 then it might cause some problem as you are accessing v[idx+1] too