func_code_string: #include <bits/stdc++.h>   using namespace std;   vector<long long> avengers;   long long n, k, A, B;   long long rec(long long l, long long r) {     long long i =         lower_bound(avengers.begin(), avengers.end(), l) - avengers.begin();     long long j =         upper_bound(avengers.begin(), avengers.end(), r) - avengers.begin();     j--;     long long x = j - i + 1;     long long power_consumed;     if (x == 0)       power_consumed = A;     else {       power_consumed = B * x * (r - l + 1);     }     if (l == r || x == 0) return power_consumed;     long long mid = (l + r) / 2;     long long minPower = min(power_consumed, rec(l, mid) + rec(mid + 1, r));     return minPower;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cout.tie(NULL);     cin >> n >> k >> A >> B;     int i;     for (i = 0; i < k; i++) {       int val;       cin >> val;       avengers.push_back(val);     }     sort(avengers.begin(), avengers.end());     long long x = (long long)1 << n;     cout << rec(1, x) << endl;     return 0;   }   