I think if you do printf("%.3lf",0LL); it works properly since double and long long are both 64 bits.Vexorian wrote:Thanks for your help everyone.
It was a very silly thing indeed.
Turns out that in some place I was doing printf("%0.3lf",0); as a rushed modiffication to handle some special cases.
But 0 is not a double, it is an integer, so the code was actually undefined, it could pretty much generate random numbers depending on the situation.
I was not able to find this before because the special cases were just in the input after some cases that already returned 0.000 , so the random bytes were assigned to zero.
But there it is.
11168 - Airport
Moderator: Board moderators
-
- New poster
- Posts: 44
- Joined: Tue Jun 06, 2006 6:44 pm
- Location: Nova Scotia, Canada
- Contact:
hello, i have been trying to solve this problem.. but i got many WA's because of overflowing... after i solved that problem... and testing rio's cases of this thread i thought i would have no problems.. but now im getting time limit exceeded... is it for my O(n^2) convex hull algorithm?.. in my computer it runs very fast for 10000 points... but perhaps there are many test cases.. anyone could solve it with an O(n^2) algorithm? ( I get the distances to an "edge" in O( 1 ).. ) thanks. eric.