I am trying to solve a problem on convex hull(my first problem on convex hull) , but don't know why getting WA. I am using Grahm's scan algo to generate all points of Hull , and then simply calculating the parameter of the hull. please can anyone tell me whats wrong with my code. thank you in advance.
Auto comment: topic has been updated by kazama460 (previous revision, new revision, compare).
I think the problem is when you are displaying the result. According to the question, the output should only include at most 1 place after decimal. For review you can see my submission — https://www.codechef.com/viewsolution/18489929
I have tried to use setprecision function , but the problem is that it is giving SIGSEGV (dont know why) , here is the solution with setprecision , it is giving SIGSEGV. Can you help me out in this?
The runtime error might be due to accessing empty stack or popping from empty stack. I will debug the code shortly.
Thanx to you man , the problem was indeed the empty stack. after 24 unsuccessful submission , i got it accepted.