Stacked Colored Paper
Time limit1sMemory limit512 MB
After gluing up to 200 triangles and circles in order, print each sheet's visible area after every prefix of the stack.
Problem
You glue sheets of colored paper onto the coordinate plane one sheet at a time, and no two sheets share a color. A sheet always lands on top of the plane and on top of every sheet that is already glued down. You cannot glue a sheet under the plane, and you cannot slide one between two sheets that are already there.
A sheet has one of two shapes.
- A triangle with vertices , ,
- A circle with center and radius
Number the sheets from to and glue them in increasing order of number. The picture below shows one gluing process.

For every , report how much of each glued sheet is visible at the moment sheets through are all in place.
Input
The first line contains an integer ().
Each of the next lines describes one sheet in gluing order. Line () starts with an integer (), the shape of sheet .
If , sheet is a triangle, and six integers , , , , , () follow on the same line, separated by spaces. The three vertices are never collinear.
If , sheet is a circle, and three integers follow on the same line, separated by spaces: the center coordinates , () and the radius ().
Output
Print lines. Line () contains numbers separated by spaces: once sheets through have been glued down in order, the visible area of sheet , the visible area of sheet , and so on through the visible area of sheet .
Round every area to six digits after the decimal point and print exactly six digits. An area of prints as 2.000000, and a sheet that is completely hidden prints as 0.000000.