cheemsdog's blog

By cheemsdog, history, 3 years ago, In English

In contest[contest:1496] , problem C 1496C - Diamond Miner 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.

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

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

I too faced the same problem during todays contest

»
3 years ago, # |
  Vote: I like it 0 Vote: I do not like it

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 .