Aerodynamics
Time limit2sMemory limit128 MB
Given points in 3D, build the convex hull and output the exact rational area of its cross-section polygon for every integer z between two bounds.
- Level
Hard8 of 10
- Topics
- Geometry, Math, Implementation
- Solved
- No attempts yet
Problem
Bill works in a secret laboratory, where he leads the aerodynamics department and designs missiles.
A striking result in aerodynamics is the Whitcomb area rule. An object flying at high subsonic speeds develops local supersonic airflow, and the resulting shock waves produce wave drag. Wave drag does not depend on the exact shape of the object, but only on its cross-sectional area profile.
Set up a coordinate system whose OZ axis points along the object's direction of motion. Let denote the area of the object's cross-section cut by the plane . The function that maps to is the object's cross-sectional profile. There is an ideal aerodynamic shape, the Sears-Haack body; the closer an object's cross-sectional profile is to that of the Sears-Haack body, the less wave drag it produces. That is the essence of the Whitcomb area rule.
Before a missile is even built, Bill's department studies its aerodynamics with computer simulations. To approximate a missile's cross-sectional profile, one samples at every integer from to .

Given a description of the missile, compute for every integer from to , inclusive. The missile is the minimal convex solid (the convex hull) that contains all of the given points. It is guaranteed that some four of the points are not coplanar.
Input
The first line contains three integers , , and (, ).
Each of the next lines contains three integers , , and — the coordinates of one point. Every coordinate has absolute value at most . No two points coincide, and some four points are not coplanar.
Output
For each integer from to , inclusive, print the cross-sectional area on its own line, in increasing order of .
Every cross-section is a convex polygon whose vertices are intersections of the solid's edges with the plane , so each vertex has rational coordinates and is always a rational number. Print as an exact fraction in lowest terms, formatted as p/q, where and . In particular, an area equal to the integer is printed as a/1, and a zero area (the plane misses the solid or only touches it along a single point or segment) is printed as 0/1.