#include <bits/stdc++.h>
using namespace std;
#define int long long
const int MAX = 1e6 + 7;
int num[MAX];
signed main()
{
	int T;
	cin >> T;
	while (T--)
	{
		int N, u, v;
		cin >> N >> u >> v;
		for (int i = 1; i <= N; i++)
		{
			cin >> num[i];
		}
		int canget = 0;
		int flag = 0;
		for (int i = 1; i < N; i++)
		{
			if (abs(num[i] - num[i + 1]) > 1)
			{
				canget = 1;
				cout << 0 << '\n';
				flag = 1;
				break;
			}
		}
		if (flag == 1)
		{
			continue;
		}
		if (canget)
		{
			continue;
		}
		int ban = 0;
		for (int i = 1; i < N; i++)
		{
			if (num[i] != num[i + 1])
			{
				ban = 1;
			}
		}
		if (ban)
		{
			cout << min(u, v) << '\n';
		}
		else
		{
			cout << min(u + v, v * 2) << '\n';
		}
	}
	return 0;
}