Abdulrahman and Hazem are playing a game. They have an array $$$a$$$ of $$$n$$$ integer numbers. Abdulrahman will choose $$$p$$$ indices $$$x_1, x_2, \dots x_p$$$ and Hazem will choose $$$q$$$ indices $$$y_1, y_2, \dots y_q$$$ where no index is chosen by both players. I.e. $$$x_i \ne y_j: 1 \le i \le p, 1 \le j \le q$$$.
After choosing their indices, let us denote the score of the players as the sum of the integers he chose from the array:
Now given $$$P$$$ and $$$Q$$$ find the maximum value for $$$S_a - S_b$$$ if Abdulrahman cannot choose more than $$$P$$$ index and Hazem cannot choose more than $$$Q$$$ index ($$$p \le P$$$, $$$q \le Q$$$)
The first line of input contains one integer $$$T$$$ ($$$1 \le T \le 10^5$$$) denoting the number of testcases.
The first line of each testcase contains three space-seperated integers $$$N$$$ ($$$1 \le n \le 10^5$$$), $$$P$$$ and $$$Q$$$ ($$$0 \le P,Q \le n$$$)
The second line of each testcase contains $$$n$$$ space-seperated integers $$$a_1,a_2,...,a_N$$$ ($$$-10^9 \le a_i \le 10^9$$$)
Its guaranteed that the sum of $$$n$$$ over all testcases is less than or equal to $$$10^5$$$.
Print the maximum value for $$$S_a - S_b$$$ Abdulrahman and Hazem can obtain.
33 1 1-2 0 23 1 26 3 -45 0 210 -6 -9 8 -7
4 10 16
| Название |
|---|


