conevex hull problems requires sorting the points in 2D in anticlockwise sense with the first point being the one with lowest y co-ord (x co-ord breaks the tie)
so this can be done by first sorting the points in order of y co-ord and then in order of polar angle by using apt comparison functions…
i solved 2 problems on spoj using it and it was a nice learning curve
heres my code :
GRDENHULL : 4Z7RHX - Online C++0x Compiler & Debugging Tool - Ideone.com
BSHEEP : 4zJsSa - Online C++0x Compiler & Debugging Tool - Ideone.com
c++11 complex container : http://www.cplusplus.com/reference/complex/complex/complex/