func_code_string: #include <bits/stdc++.h>   using namespace std;   signed main() {     ios::sync_with_stdio(false);     cin.tie(0);     long long t;     cin >> t;     while (t--) {       long long n, a, b;       cin >> n >> a >> b;       string s;       cin >> s;       for (long long i = 1; i < s.length() - 1; i++) {         if (s[i] ==  0 ) {           if (s[i + 1] ==  1  && s[i - 1] ==  1 ) s[i] =  1 ;         }       }       long long c = -1;       long long ans = 0;       vector<long long> v;       for (long long i = 0; i < s.length(); i++) {         char ch = s[i];         long long d = 0;         while (s[i] == ch && i < s.length()) {           i++;           d++;         }         i--;         ans += d * a;         if (ch ==  0 )           ans += (d + 1) * b;         else           ans += (d + 1) * 2 * b;         if (ch ==  0 ) v.push_back(d);         c++;       }       ans += c * (a - b);       long long p = v.size();       if (p > 2) {         for (long long i = 1; i < p - 1; i++) {           if (2 * a > b * (v[i] - 1)) {             ans -= 2 * a;             ans += b * (v[i] - 1);           }         }       }       cout << ans << endl;     }     return 0;   }   