I am getting WA in Spoj Problem ,Build the fence . Link to the problem : https://www.spoj.com/problems/BSHEEP/ Link to my code : https://ideone.com/OpAj4u . Can anyone help me to find the error or give any counter test case. I used graham scan algorithm to make my code efficient.