#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const int maxn = 100005;
int main(void) {
  int t;
  cin >> t;
  while (t--) {
    string s;
    int Size, n, m, p;
    cin >> Size >> n >> m >> p;
    cin >> s;
    int cnt1 = 0, cnt0 = 0;
    for (int i = 0; i < Size; i++) {
      if (s[i] == '1')
        cnt1++;
      else
        cnt0++;
    }
    int ans = n * cnt0 + m * cnt1;
    if (n > m && n - m > p)
      ans = (p + m) * cnt0 + m * cnt1;
    else if (m > n && m - n > p)
      ans = n * cnt0 + (n + p) * cnt1;
    cout << ans << endl;
  }
  return 0;
}
