I got WA with "error = '-0.0000000'"

Revision en1, by spectaclehong, 2018-08-03 20:21:20

I entered Educational Codeforces Round 48, and I got WA in problem E.

With the contest end, I checked command : wrong answer 154th numbers differ — expected: '0.0000000', found: '-0.0000000', error = '-0.0000000'

I tried change -0 to 0 with abs function, but it doesn't work.

My source code : http://mirror.codeforces.com/contest/1016/submission/41186743

Why this happens, and how can I fix it? Does it have a meaning that I do not know at -0.000?

Tags floating number

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English spectaclehong 2018-08-03 20:21:20 499 Initial revision (published)