시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 128 MB | 1 | 1 | 1 | 100.000% |
The Acme Extrusion Company specializes in the production of steel bars with custom-designed cross-sections. The manufacturing process involves cutting a hole in a thick metal plate, the shape of the hole being determined by the customer’s specifications.
Molten metal is then forced through the hole to form a long bar. The shape of the hole determines the shape of the cross-section of the resulting bar.
Given a description of a polygonal hole and the volume of molten metal available, determine how long a bar can be formed by this process.
Input consists of one or more data sets consisting of the following information:
For each data set, the program should produce a single line of output of the form:
BAR LENGTH: x
where “x” is the maximum bar length, a floating point number expressed with two digits precision.
expressed as a polygon (vertices visited in clockwise order, each vertex described via (x,y) coordinates expressed in units of meters) and the volume of the available molten metal (in cubic
meters),
4 0.0 0.0 0.0 0.1 0.1 0.1 0.1 0.0 1.0 7 0.5 1.25 0.9 1.6 0.9 1.1 0.85 1.0 0.9 0.85 0.9 0.5 0.5 0.75 100.0 0
BAR LENGTH: 100.00 BAR LENGTH: 318.73