GIven this problem:
Given $$$n$$$ pairs $$$a_i$$$, $$$b_i$$$, pick $$$k$$$ of them so that $$$\frac{\sum_{}^{}a_i}{\sum_{}^{}b_i}$$$ is maximized, output the maximum value.
Constraints:
$$$1 \le k \le n \le 200000$$$
$$$a_i, b_i \le 10^{6}$$$
I have this scuffed greedy algorithm which does the following:
Assume the result is $$$\ge x$$$, then let $$$u_i = a_i - xb_i$$$
Greedily
Code



