#include <iostream>
#include<bits/stdc++.h>
#define lli long long int
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define fr(i,n) for(i=0;i<n;i++)
#define F first
#define S second
#define ios ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
#define mod 998244353
#define pi 3.14159265
using namespace std;
 
 
 
 
 
int main() {
    
    ios
 long long int t,i,x,y,m,n,j,k,ans=0,count=0,tot=0,flag,od,ev,sum,ma,mi;
 cin>>t;
 while(t--)
 {
     cin>>n>>x>>y;
     lli a[n];
     flag=0;
     cin>>a[0];
     tot=a[0];
     ans=0;
     fr(i,n-1)
     {
         cin>>a[i+1];
         if(a[i+1]!=tot)
         {
             flag=1;
         }
         if(abs(a[i+1]-a[i])>1)
         {
             ans=1;
         }
     }
     if(ans==1)
     {
         cout<<"0\n";
     }
     else if(flag==1)
     {
         cout<<min(x,y)<<"\n";
     }
     else
     {
         cout<<min(x+y,y+y)<<"\n";
     }
 }
 return 0;
 }