Блог пользователя border

Автор border, 5 лет назад, По-английски

submission 1 submission 2

Is it because of the bitwise operators? If so, why?

  • Проголосовать: нравится
  • +12
  • Проголосовать: не нравится

»
5 лет назад, # |
Rev. 4   Проголосовать: нравится +1 Проголосовать: не нравится

Seeing that there is quite some time between these two submissions, this is probably a difference in the way memory usage was measured by the judge. If you submit your older solution again you should get the same memory usage. See here.

The only difference between bitwise and modulus operator is in their behavior for negative numbers, otherwise the compiler would directly replace the modulus by a single bitwise operation. It does so if you check for even numbers. So there's no reason this would have a notable effect on memory usage.