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

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

Just like the title, I submitted two codes at 534F, and then they got RE on #55 and AC. But you can see that they only have difference on the last row (a comment //???).

What happened on them or judge?

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

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

You have vector<int> cnt of size $$$n$$$ created on line 126. And then on line 130 you have fr1(q,0,4) cnt[q]=0. Running this line may result in undefined behavior because the size of cnt may be less than needed.