Please read the new rule regarding the restriction on the use of AI tools. ×

YANORMALNOSUPERGOOD's blog

By YANORMALNOSUPERGOOD, history, 6 years ago, In Russian

Couple of days ago I posted a comment, where noticed that given algorithm can works in wrong way and got -61(!). Also you can notice, that comment from MrDindows got +18, which is IMO is less valuable. I'm not angry with MrDindows, but I want to understand why I got -61 ?

| Write comment?
»
6 years ago, # |
  Vote: I like it 0 Vote: I do not like it

It is unusual for modern contest problems to deal with numbers at the very end of int32 or int64 range. Either the calculations are performed modulo 232 or 264, or they are limited by some numbers reasonably far from the bounds.

My speculation is that the contribution score you got shows how much people dislike the idea of dealing with such edge cases. The reason is that most problem authors and contestants want to deal with higher level algorithmic ideas more than with lower level technical stuff.

Personally, I quite liked the tests you have shown in the comments, but only when reading for the second time. The first knee-jerk reaction was "meh, so what? people won't use this code for these numbers..."