Leftist_G's blog

By Leftist_G, history, 8 months ago, In English

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?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
8 months ago, # |
  Vote: I like it 0 Vote: I do not like it

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.