#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int t, n, c0, c1, h;
  string s;
  cin >> t;
  while (t--) {
    cin >> n >> c0 >> c1 >> h;
    cin >> s;
    int cant1 = 0, cant0 = 0;
    for (int i = 0; i < n; ++i) {
      cant1 += (s[i] == '1');
      cant0 += (s[i] == '0');
    }
    int ans = cant1 * c1 + cant0 * c0;
    for (int i = 0; i <= n; ++i) {
      int aux = i * c0 + (n - i) * c1;
      aux += abs(i - cant0) * h;
      ans = min(ans, aux);
    }
    cout << ans << "\n";
  }
  return 0;
}
