#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  while (t--) {
    int n, c0, c1, h;
    cin >> n >> c0 >> c1 >> h;
    string str;
    cin >> str;
    int zero = 0, one = 0;
    for (int i = 0; i < n; i++) {
      if (str[i] == '0') {
        zero++;
      } else {
        one++;
      }
    }
    int max = INT_MAX;
    if (c0 >= c1) {
      for (int i = 0; i <= n; i++) {
        int tone = one, tzero = zero;
        tone += i;
        tzero -= i;
        if (tone < 0 || tzero < 0) break;
        int res = tone * c1 + tzero * c0 + i * h;
        if (res < max) {
          max = res;
        }
      }
      cout << (max) << endl;
    } else {
      for (int i = 0; i <= n; i++) {
        int tone = one, tzero = zero;
        tone -= i;
        tzero += i;
        if (tone < 0 || tzero < 0) break;
        int res = tone * c1 + tzero * c0 + i * h;
        if (res < max) {
          max = res;
        }
      }
      cout << (max) << endl;
    }
  }
}
