Suppose there are n objects. Each object has two attributes xi and yi (1<=xi,yi<=10^6).
You can only choose k objects. The score of your choice is caculated by the multiplication of
Which k objects you should choose to maximize the score of your choice? (1<=k<=n<=3*10^5)
Example, there are 3 objects, their attributes are below:
1 1
2 2
3 3You can choose 2 objects.
Then the maximum score of your choice is (2+3)*2=10.