func_code_string: #include <bits/stdc++.h>   using namespace std;   long long a[100020], b[100020];   int main() {     int m, n;     scanf( %d%d , &m, &n);     long long sum1 = 0, sum2 = 0, s1 = 0, s2 = 0, Max1 = 0, Max2 = 0;     for (int i = 1; i <= m; i++) {       scanf( %I64d , &a[i]);       sum1 += a[i];       if (a[i] > Max1) {         Max1 = a[i];         s1 = i;       }     }     for (int i = 1; i <= n; i++) {       scanf( %I64d , &b[i]);       sum2 += b[i];       if (b[i] > Max2) {         Max2 = b[i];         s2 = i;       }     }     long long ans1 = sum1 * n, ans2 = sum2 * m;     for (int i = 1; i <= m; i++) {       if (i != s1 && a[i] < sum2) ans2 = ans2 - sum2 + a[i];     }     for (int i = 1; i <= n; i++) {       if (i != s2 && b[i] < sum1) ans1 = ans1 - sum1 + b[i];     }     if (ans1 > ans2)       printf( %I64d n , ans2);     else       printf( %I64d n , ans1);     return 0;   }   