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

Автор cheemsdog, история, 3 года назад, По-английски

In contest[contest:1496] , problem C 1496C - Добытчик алмазов two solutions i submitted one 109632555 other with 109632518. Both are exactly the same except that in one array values are initialized by int data type and the other with a double. Int one is giving AC, whereas the other is giving TLE.

Please help me out.

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

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

I too faced the same problem during todays contest

»
3 года назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

double has more number of bits to keep precision and thus more time required for input i think . Also it's bad idea to take integer type input as double because there can be loss of precision .