As the end of the 2017/18 campaign approaches, football clubs across Europe will be assessing theirs quads and deciding which areas they need to improve when the summer transfer window opens. Clubs could sell and buy players as they want. Aguin is a fan of Real Madrid, and he pays close attention to the summer transfer window. Among the data he collected, Real Madrid only has P dollars for the transfer window with the financial pressure. Real Madrid has n players, each of them has the ability value ai and the transfer value bi. . Also there are m players of other clubs are in the sale, each of them has the ability value ci and the transfer value di. Aguin is curious the maximum sum of players’ ability value Real Madrid could has. But he’s too stupid to calculate it. Can you tell him?Pay attention, what Aguin want is the maximum sum, even the number of Real Madrid players is less than 11.
As the end of the 2017/18 campaign approaches, football clubs across Europe will be assessing theirs quads and deciding which areas they need to improve when the summer transfer window opens. Clubs could sell and buy players as they want. Aguin is a fan of Real Madrid, and he pays close attention to the summer transfer window. Among the data he collected, Real Madrid only has P dollars for the transfer window with the financial pressure. Real Madrid has n players, each of them has the ability value ai and the transfer value bi. (Real Madrid can obtain bi dollars by selling the itℎ player). Also there are m players of other clubs are in the sale, each of them has the ability value ci and the transfer value di. (Real Madrid will cost di dollars by buying the ith player) Aguin is curious the maximum sum of players’ ability value Real Madrid could has. But he’s too stupid to calculate it. Can you tell him? Pay attention, what Aguin want is the maximum sum, even the number of Real Madrid players is less than 11.