func_code_string: #include <bits/stdc++.h>   using namespace std;   int32_t main() {     ios_base::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     long long t;     cin >> t;     while (t--) {       long long n, a, b;       cin >> n >> a >> b;       long long dp[4][n + 1];       string s;       cin >> s;       vector<long long> v(n + 1, 0);       for (long long i = 1; i <= n; i++)         if (s[i - 1] ==  1 ) v[i] = 1;       dp[0][0] = dp[1][0] = dp[2][0] = dp[3][0] = b;       for (long long i = 1; i <= n; i++) {         if (i == 1) {           dp[0][i] = dp[0][0] + a + b;           dp[1][i] = dp[0][0] + 2 * a + 2 * b;           continue;         }         if (v[i] && v[i - 1])           dp[0][i] = dp[1][i] = dp[1][i - 1] + a + 2 * b;         else if (v[i] && !v[i - 1]) {           dp[0][i] = dp[1][i] =               min(dp[1][i - 1], dp[0][i - 2] + 2 * a + 2 * b) + a + 2 * b;         } else if (!v[i] && !v[i - 1]) {           dp[0][i] = min(dp[0][i - 1], dp[1][i - 1] + a) + b + a;           dp[1][i] = min(dp[1][i - 1] + a, dp[0][i - 1] + 2 * a) + 2 * b;         } else if (!v[i] && v[i - 1]) {           dp[0][i] = dp[1][i - 1] + 2 * a + b;           dp[1][i] = dp[1][i - 1] + 2 * b + a;         }       }       cout << dp[0][n] << endl;     }     return 0;   }   