| Codeforces Round 1087 (Div. 2) |
|---|
| Finished |
OtterZ set up a battle with $$$n$$$ monsters in order to increase his combat power. Each monster has a combat power $$$a_i$$$ and OtterZ has a combat power of $$$c$$$. He has $$$k$$$ flip flops and can perform the following operations:
Each test contains multiple test cases. The first line contains the number of test cases $$$t$$$ ($$$1 \le t \le 500$$$). The description of the test cases follows.
The first line of each test case contains three integers $$$n$$$, $$$c$$$ and $$$k$$$ ($$$1 \le n \le 100$$$, $$$0 \le c,k \le 10 ^ 9$$$).
The second line contains $$$n$$$ integers $$$a_1,a_2,\ldots,a_n$$$ ($$$0\le a_i\le 10 ^ 9$$$).
For each test case, output an integer — the maximum possible combat power.
101 12 23211 8 451 3 4163 6 314 9 115 9 220 16 18 16 115 18 301 2 93 84 27 29 132 9 38 4 7 1 610 9 28 1 8 11 17 3 14 16 20 1010 192 1091 9 20 9 829 3 87 1 283 710 1000000000 100000000019 1000000000 1 9 2 3 8 1 2 3
1216369531091197213000000048
In the first test,OtterZ found a strong monster and ran away, with combat power $$$12$$$.
In the sixth test, OtterZ participated in the battle:
| Name |
|---|


