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

Автор SampersandU, история, 7 лет назад, По-английски

http://mirror.codeforces.com/contest/514/submission/26169645 http://mirror.codeforces.com/contest/514/submission/26169620

How is that even possible?? The only difference between the sources is the declaration of the Set container (double). Is there anybody who can explain THAAT?????

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

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

Just never use set to count doubles. Use epsilon when you work with doubles, or try to avoid doubles in program.

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

A similar question was asked a few weeks ago. Take a look at my comment for more information.

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

    However, I don't see why the declaration of set in the global area adds at the 8th test ~11 extra elements, returning 47 instead of 36.