GARDENHU - Garden Hull
We have a garden with trees in it. For each tree is represented by x and y coordinates. Your goal is to find the least amount of net needed to surround all the trees so that all trees are inside the net. In other words you need to find the the length of the convex hull around those points.
On the first line a lonely integer N (3 <= N <= 10000) representing the number of trees in the garden. On each of the following N lines you will find two integers - the coordinates of the next tree.
A single integer - the length of the convex hull. Round it up to an integer.
Input: 4 0 0 5 0 1 1 0 5 Output: 17
I used round() instead of ceil() and I got the correct answer. Wording of the question is a bit ambiguous, but it means round to the nearest integer.
Question unclear... what to do with area if actual area comes to 17.55(for example)??
so if rounding up, isnt the answer 18
"to round up" means "to get it rounded"
Thanks for a nice problem. It is very good for newbie.