func_code_string: #include <bits/stdc++.h>   int main() {     std::ios::sync_with_stdio(false);     int n;     long long m, k;     long long tmp;     std::cin >> n >> m >> k;     std::vector<long long> a;     for (int i = 0; i < n; i++) {       std::cin >> tmp;       a.push_back(tmp);     }     std::sort(a.begin(), a.end());     std::cout << (m / (k + 1)) * (*(a.end() - 2)) +                      (m - (m / (k + 1))) * (*(a.end() - 1));     return 0;   }   