If I have a constraint like $y_1 + y_2 +\dots + y_n = k$ for positive integers $x_i$$y_i$, how would I minimize $$\quad\frac{x_1 }{ y_1} + \frac{x_2 }{ y_2} + \frac{x_3 }{ y_3} + \dots + \frac{x_n }{ y_n}$$ if all of the $a_i$$x_i$ are given?
One can assume that $n\le5\cdot10^5$ and $k\le10^{12}$.