ndatta's blog

By ndatta, 10 years ago, In English

sub1: http://codeforces.net/contest/512/submission/9696765 sub2: http://codeforces.net/contest/512/submission/9696746

Difference between above two code in line 24. in AC submission I wrote ar[111] where n=100. In another submission I wrote ar[33]. But the second verdict is WA. Why that happen?

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it +1 Vote: I do not like it

when u access out of bounds of an array, it's not defined in c++ what will happen. undefined behavior