In her bike rides around Warsaw, Jill happened upon a shop that sold interesting glass bottles. She thought it might make an interesting project to use such bottles for measuring liquids, but this would require placing markings on the bottles to indicate various volumes. Where should those volume marks be placed?
Jill formalized the problem as follows. Assume a bottle is formed by revolving a shape that is the same as the graph of a polynomial P between X=Xlow and X=Xhigh around the X-axis. Thus the X-axis is coincident with a vertical line through the center of the bottle. The bottom of the bottle is formed by a solid circular region at X=Xlow , and the top of the bottle, atX=Xhigh , is left open.
The first sample input represents a bottle formed using the simple polynomial 4 0:25x, with Xlow=0and Xhigh=12. The bottom of this bottle is a circle with a radius of 4, and the opening at the top is a circle with a radius of 1. The height of this bottle is 12. Volume markings are in increments of 25.
Given a polynomial P,Xlow ,Xhigh , and the volume increment between successive marks on the bottle,compute the distances up from Xlow for the marks at successive volume increments. A mark cannot be made past the top of the bottle, and no more than the first 8 increments should be marked. Assume the value of P is greater than zero everywhere between Xlow and Xhigh .