You want to hire exactly workers. Each worker has a quality and a minimum wage expectation. Workers must be paid proportionally to their quality and at least their minimum wage.
Find the minimum cost. The problem combines sorting by ratio with heap-based selection. The ratio determines how "expensive" a worker is per unit of quality.