|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||2||2||2||100.000%|
Flatland needs a superhero! Recently swarms of killer ants have been invading Flatland, and nobody in Flatland can figure out how to stop these dastardly denizens. Fortunately, you (as a higher dimensional being) have the opportunity to become a superhero in the eyes of the Flatland citizens! Your job is to “freeze” swarms of ants using parallelograms. You will do this by writing a program that finds a minimal area enclosing parallelogram for each swarm of ants. Once a minimal area parallelogram is placed around the ant swarm, they are effectively frozen in place and can no longer inflict terror on planar inhabitants.
Figure 2: A Frozen Swarm of Ants in Flatland
The input will consist of the following:
For each swarm, your algorithm should output a line that contains “Swarm i Parallelogram Area: ”, where i (1 ≤ i ≤ s) is the swarm number, followed by the minimum area (rounded to 4 decimal digits and using fixed point format) of an enclosing parallelogram for that swarm. All computations should be done using 64 bit IEEE floating point numbers, and the final answers displayed in fixed point decimal notation and rounded to four decimal digits of accuracy as shown in the sample input and output.
2 6 0.0000 0.0000 -0.5000 -0.5000 -1.0000 0.0000 -0.7000 -7.0000 -1.0000 -1.0000 0.0000 -1.0000 5 2.0000 2.0000 0.0000 0.0000 0.5000 2.0000 1.0000 1.0000 1.5000 0.0000
Swarm 1 Parallelogram Area: 7.0000 Swarm 2 Parallelogram Area: 3.0000