Conveyor belts

ifnextchar ( ifnextchar (offsettrue(0pt,0pt) offsetfalse ifnextchar
[(0pt,0pt)(0pt,0pt) ifnextchar
[(0pt,0pt)(0pt,0pt)[l](0pt,0pt)(0pt,0pt)[l][] [r][image]

Víctor González likes walking on the conveyor belts of the airports in
the opposite direction. Help him to spend the minimum possible energy to
traverse them completely, using the following model:

Each conveyor belt is ℓ meters long, and it moves at a constant speed of
c meters per second. Víctor, moving uniformly at v meters per second,
spends a + bv² energy units per second, where a and b are two positive
constants. That is, he has a minimal cost a for breathing, plus an
increase proportional to the square of his speed v w.r.t. to the ground
he walks on. Moreover, we have the restriction v ≤ 10 (he is in top
shape, but he cannot move faster than this).

Write a program such that, for each given combination of ℓ, c, a and b,
prints the speed with which Victor will spend the minimum amount of
energy while traversing the conveyor belt in opposite direction.

Input

Input consists of several cases, each with ℓ, c, a and b, all them
strictly positive real numbers. Assume c < 10.

Output

For every case, print in a line the optimal speed with 4 digits after
the decimal point. Input cases do not have precision issues.

Problem information

Author: Unknown
Translator: Carlos Molina

Generation: 2026-01-25T11:34:26.653Z

© Jutge.org, 2006–2026.
https://jutge.org
