Mishra owns a very big firm. Large number of customers, large set of products to be delivered, is really making him insane.
Products are to be loaded in the van to get delivered. This whole system is automated. But have serious time issues.
With every product, is given the time taken for it to get loaded(ai).
1. if the product is loaded from left, it takes X1 x ai(product) time(for each product).
2. if the product is loaded from right it takes X2 x ai(product) time.
3. if you pick two product from the same side consecutively penalty of Y1(left) or Y2(right) is imposed.
Mishra being a computer expert designs an algo to compute the minimum time taken to load all the products.
You are given the task to verify that the time computed is minimum.
Input:
First line contains t denoting number of test cases.
Next line contains 5 integers namely n,X1,X2,Y1,Y2
The next line contains n integers ai denoting time associated with each product.
Output:
Output contains a single line for every test case the minimum time to get all the products loaded.
Constraints:
1 < t < 100
1 <= n <= 100000
0 <= ai <= 100
1 <= X1,X2 <= 100
1 <= Y1,Y2 <= 10^4
Case 1: 176(L) + 36(R) + 276(L) Case 2: 42(R) + 17(L) + 32(R) + 2*2(R) + 9(Penalty)