func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 100000 + 1;   int n, m, s;   int b[maxn];   int p[maxn];   int ansn, anst;   bool ok(int k) {     int i = n - 1;     int j = k - 1;     int tansn = 0, tanst = 0;     int ss = s;     while (j >= 0) {       if (i >= 0 && b[i] >= p[j]) {         tanst += p[j];         tansn++;         j--;         i--;       } else if (i >= 0 && p[j] > b[i] && ss >= p[j] - b[i]) {         tanst += b[i];         tansn++;         ss -= (p[j] - b[i]);         j--;         i--;       } else if (i >= 0)         i--;       else         j--;     }     if (ss > 0) tanst = max(0, tanst - ss);     if (tansn == k && tansn > ansn) {       ansn = tansn;       anst = tanst;     }     return tansn == k;   }   int main() {     scanf( %d %d %d , &n, &m, &s);     for (int i = 0; i < n; i++) scanf( %d , b + i);     for (int i = 0; i < m; i++) scanf( %d , p + i);     sort(b, b + n);     sort(p, p + m);     int l = 0;     int r = m + 1;     int mid;     while (l + 1 < r) {       mid = (l + r) / 2;       if (ok(mid))         l = mid;       else         r = mid;     }     printf( %d %d n , ansn, anst);     return 0;   }   