10kdogmore's blog

By 10kdogmore, history, 5 months ago, In English

During Codeforces Round 1065 (Div. 3), I wrote problem H and defined a segment tree. I queried max to m+n+1 but forgot to expand my tree[MAXN<<2] array, so it should cause a UB. Unexpectedly, I passed the problem and my friends all failed to hack me. Can somebody hack me or explain the reason why it can pass? Thanks so much.

Submission ID: 349946106

  • Vote: I like it
  • +17
  • Vote: I do not like it

»
5 months ago, hide # |
 
Vote: I like it +10 Vote: I do not like it

Please hack him, because I made a bet with him. If anyone hacks him, I will get a McFlurry.

»
5 months ago, hide # |
 
Vote: I like it +9 Vote: I do not like it

It got RTE on my computer but somehow got AC on codeforces. I don't understand how.