imtinanjibon's blog

By imtinanjibon, history, 5 years ago, In English

I am trying to solve 478B - Random Teams . And here is my submission 81868059 . Logic is good but still gives wrong answer in 12th test case. before 12th case there was large integer input but answer was good. I have failed to understand whats wrong with this. How should i fix this?

  • Vote: I like it
  • -27
  • Vote: I do not like it

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

Avoid using doubles if they are not needed. Here you can do everything on long longs.

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

Do not use doubles if avoidable, they are error prone.