Why using long long fails, but using double gets AC? (when we don't deal with floating point numbers)

Правка en1, от DorelBarbu, 2016-09-21 00:16:18

Hello, everybody! I was solving http://codeforces.net/contest/319/problem/C which uses the "Convex Hull Trick". After many failed attempts I peeked at the AC solutions.I found a very interesting thing. This gets AC. However, if I replace the explicit conversion to double, with an explicit conversion to long long (which seems more suitable in this case, since we're not dealing with floating point numbers) I get WA, like this. Now, forgive me if it is a dumb question but I really didn't come across something like this before. Can someody help me figure it out? Thank you!

Теги convex hull optimization, double, long longs, compare function

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский DorelBarbu 2016-09-21 00:16:18 790 Initial revision (published)