matcoder's blog

By matcoder, history, 5 years ago, In English

This is in reference to the problem A 'Parity' of today's round.


The following submissions were in my room. I tried hacking one of these solution and got the 'unsuccessful' verdict.
The bug in the codes seems to be the overflow. If you try to print the final sum in these solutions, you get to see the overflowed value (i.e. in some cases it gives negative values too), even in the custom invocation.

Link to the submissions:
Code1
Code2


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

»
5 years ago, # |
  Vote: I like it +15 Vote: I do not like it

Sadly, the "overflow" process doesn't change the parity of the number (cycle of 232 integers, y'know), thus these submissions are still correct. ;)