Alice is a quantitative trader. She is backtesting a high-frequency trading strategy now. Given a stock's price sequence at $$$n$$$ time points, denoted as $$$v_1, v_2, \ldots, v_n$$$.
The trading bot Alice has set up is controlled by two parameters: a buy threshold $$$a$$$ and a sell threshold $$$b$$$ ($$$a \lt b$$$), and strictly follows the following rules:
Given a fixed buy threshold $$$a$$$, there are $$$m$$$ independent queries, each specifying a sell threshold $$$b$$$. For each query, please help Alice calculate the total profit under this strategy (total proceeds from sales minus total costs from purchases).
The first line contains a positive integer $$$T$$$ ($$$1 \le T \le 10^4$$$), the number of test cases.
For each test case, the first line contains two positive integers $$$n, a$$$ ($$$1 \le n \le 2 \times 10^5$$$, $$$1 \le a \lt 10^9$$$), representing the number of time points and the buy threshold.
The second line contains $$$n$$$ integers $$$v_1, v_2, \ldots, v_n$$$ ($$$1 \le v_i \le 10^9$$$), giving the historical stock prices at each time point in chronological order.
The third line contains an integer $$$m$$$ ($$$1 \le m \le 2 \times 10^5$$$), representing the number of queries.
The next line contains $$$m$$$ integers $$$b_1, b_2, \ldots, b_m$$$ ($$$a \lt b_i \le 10^9$$$), representing the sell threshold for each query.
It is guaranteed that over all test cases, the sum of $$$n$$$ and the sum of $$$m$$$ do not exceed $$$2 \times 10^5$$$.
For each test case, output one line containing $$$m$$$ integers separated by spaces, representing the final profit of the trading strategy for each query.
25 105 8 15 12 1311 13 166 105 5 15 12 20 11311 13 16
14 3 -1117 25 21
For the first query on the first test case ($$$a=10, b=11$$$), the trading process is as follows: