#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
const int mod = 998244353;
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int T;
  cin >> T;
  while (T--) {
    int n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    int num1 = 0, num2 = 0;
    string s;
    cin >> s;
    for (auto& x : s) {
      num1 += (x == '0');
      num2 += (x == '1');
    }
    cout << min(num1 * c0 + num2 * c1, min((num2 + num1) * c1 + num1 * h,
                                           (num1 + num2) * c0 + num2 * h))
         << "\n";
  }
  return 0;
}
