Recently, Hellen played her favorite game "Heroes of Might". She had a hero with only one Rust dragon, which was attacked by another hero with a lot of peasants. Another hero had n groups of peasants, i-th of them had a_i peasants in it. Unfortunately, Hellen lost that battle, but now she is wondering how big the health of the Rust dragon should be to win against such a big army of peasants?
Let's discuss how the battle goes. Initially, the Rust dragon has h_d health points, and each peasant has h_p health points. So i-th group of peasants has a total of H=h_p⋅a_i health points at the start of the battle. The battle consists of several rounds. In each round, two things happen:
If the dragon's health becomes zero or less at any point, it dies and Hellen loses. If all peasant groups are destroyed, Hellen wins the battle.
You need to determine the smallest possible h_d, which could make Hellen win if she chooses targets on each turn optimally.
The first line of the input contains an integer t (1≤t≤1000) --- the number of test cases you need to solve.
Each of the test cases is described by two lines. The first line contains three numbers n (1≤n≤1000), d (1≤d≤109), and h_p (1≤h_p≤109) --- the number of peasant groups, the dragon's damage rating, and the health of each peasant. The second line contains n numbers a_i (1≤a_i≤109;h_p⋅∑a_i≤109) --- the number of peasants in each group.
The sum of n over all test cases does not exceed 1000.
For each test case, output one number --- the smallest amount of health h_d that the dragon should have for Hellen to win the battle. If the dragon is never attacked by a peasant, it should still have positive health, so output 1 in this case.
In the third test case, the optimal Hellen's strategy leads to the following battle. At the start, the dragon has h_d=26 health points, and two groups of peasants have H_1=4⋅10 and H_2=5⋅10 health points. We'll denote them as H_1=40(4) and H_2=50(5), placing the value of ⌈h_pH⌉ in the brackets.
| h_d=26, H_1=40(4), H_2=50(5) | Round 1 | The dragon attacks the first group, dealing 15 damage, leaving H_1=25(3). |
| h_d=26, H_1=25(3), H_2=50(5) | Peasants attack the dragon, dealing 3+5 damage, leaving h_d=18. | |
| h_d=18, H_1=25(3), H_2=50(5) | Round 2 | The dragon attacks the first group, dealing 15 damage, leaving H_1=10(1). |
| h_d=18, H_1=10(1), H_2=50(5) | & Peasants attack the dragon, dealing 1+5 damage, leaving h_d=12. | |
| h_d=12, H_1=10(1), H_2=50(5) | Round 3 | The dragon attacks the second group, dealing 15 damage, leaving H_2=35(4). |
| h_d=12, H_1=10(1), H_2=35(4) | Peasants attack the dragon, dealing 1+4 damage, leaving h_d=7. | |
| h_d=7, H_1=10(1), H_2=35(4) | Round 4 | The dragon attacks the second group, dealing 15 damage, leaving H_2=20(2). |
| h_d=7, H_1=10(1), H_2=20(2) | Peasants attack the dragon, dealing 1+2 damage, leaving h_d=4. | |
| h_d=4, H_1=10(1), H_2=20(2) | Round 5 | The dragon attacks the second group, dealing 15 damage, leaving H_2=5(1) |
| h_d=4, H_1=10(1), H_2=5(1) | Peasants attack the dragon, dealing 1+1 damage, leaving h_d=2. | |
| h_d=2, H_1=10(1), H_2=5(1) | Round 6 | The dragon attacks the second group, destroying it, so it is removed from the game. |
| h_d=2, H_1=10(1) | Peasants attack the dragon, dealing 1 damage, leaving h_d=1. | |
| h_d=1, H_1=10(1) | Round 7 | The dragon attacks the first group, destroying it, so it is removed from the game. |
| h_d=1 | Game over | The dragon is still alive, Hellen wins. |