TopcoderArchive
Archive
Algorithm problem

FullTank

Problem statement, definition, constraints, and public examples.

Problem Statement

You watch over a tank, which aggregates water from several pipes. You will be given the height of the tank. For each of sinks, you will be given how high is it placed from the bottom, and how will the water level decrease per second if the water will flow through this sink. For each pipe, you will be given the time when water starts flow from this pipe, the duration of this flow and the volume of the water per second. You should return if you are given radius of the pipe, place it as high as possible to avoid the tank being overfilled If you are given the height, return the minimal neede radius of the sink 1.

Definition

Class:
FullTank
Method:
placeSink
Parameters:
String[], String[], int
Returns:
double
Method signature:
double placeSink(String[] flowIn, String[] sinks, int height)
(be sure your method is public)

Constraints

    Examples

      No public sample cases were explicitly marked for this problem in the original data.

      Back to all problems