Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE MAKE SOLUTION IN JAVA Team Rocket is at it again! There's a large field filled to the brim with Pokmon! Team Rocket wants to

image text in transcribed

image text in transcribed

image text in transcribed

PLEASE MAKE SOLUTION IN JAVA

Team Rocket is at it again! There's a large field filled to the brim with Pokmon! Team Rocket wants to capture them all in their quest to... hmm... take over the world? Or something like that? That's beside the point; their ultimate plan will fail unless they capture every single Pokmon in the field! They will fly a plane over the field and drop a huge net over the Pokmon to capture them! But netting is expensive. And when you are taking over the world (or something) you have.to be efficient with your Pokdollars. Team Rocket wants to make sure they don't buy any more netting than they absolutely need. The netting company is very particular about their netting cutting though, they won't do any cuts that would result in a net shape where the intersection points between the boundary points of the net leave the polygon. In other words, the net must be in the shape of a convex polygon Team Rocket's Pokradar has returned a list of X.Y coordinates of each Pokmon in the field. Can you writea program that will return the number of square meters of netting that Team Rocket needs to purchase? The netting can be purchased at any specified size, so the total area is all that is needed Input Format The first line contains a single integer N, the number of Pokmon in the field. The next N lines each contain two integers separated by a space Where x and y are the x and y coordinates of the ith Pokmon in the field (x and y are given in meters, so you don't need to worry about units) Constraints 3 S N s 219 25000 S x,yi 25000 Output Format A single number A, which is the minimum area of netting that Team Rocket needs to buy Note: A 23 and 2 AEZ condition in this note, this means that your output will always end in either.0 or .5, e.g. 42.5 or 149597900.0 Sample Input 0 4 e Your output should always contain exactly one decimal place. Coupled with the second Sample Output 0 12.5 Explanation 0

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Machine Learning And Knowledge Discovery In Databases European Conference Ecml Pkdd 2014 Nancy France September 15 19 2014 Proceedings Part 2 Lnai 8725

Authors: Toon Calders ,Floriana Esposito ,Eyke Hullermeier ,Rosa Meo

2014th Edition

3662448505, 978-3662448502

More Books

Students also viewed these Databases questions