#include <iostream>
#include <vector>

using namespace std;

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.precision(10);

    int t;
    cin >> t;
    while (t--) {
        long long n, u, v;
        cin >> n >> u >> v;
        vector<int> a(n);
        for (int& i : a) cin >> i;
        bool blocked = true;
        for (int i = 1; i < n; i++)
            if (abs(a[i] - a[i-1]) > 1)
                blocked = false;
        if (!blocked) {
            cout << "0\n";
            continue;
        }
        bool equal = true;
        for (int i : a)
            if (i != a[0])
                equal = false;
        if (equal) {
            cout << min(2*v, u+v) << "\n";
        } else {
            cout << min(u, v) << "\n";
        }
    }

    return 0;
}
