func_code_string: #include <bits/stdc++.h>   const long long MOD = 1e9 + 7;   const long long MAXN = 1e6 + 1;   using namespace std;   long long readInt() {     bool minus1 = false;     long long result = 0;     char ch;     ch = getchar();     while (true) {       if (ch ==  - ) break;       if (ch >=  0  && ch <=  9 ) break;       ch = getchar();     }     if (ch ==  - )       minus1 = true;     else       result = ch -  0 ;     while (true) {       ch = getchar();       if (ch <  0  || ch >  9 ) break;       result = result * 10 + (ch -  0 );     }     if (minus1)       return -result;     else       return result;   }   long long a[MAXN];   long long b[MAXN];   long long pref_a[MAXN];   long long pref_b[MAXN];   long long mn[MAXN];   long long n, m;   long long x;   long long GGGG(long long kek) {     int l = 1, r = m;     while (r - l > 1) {       int mid = (l + r) / 2;       if (kek * mn[mid] <= x) {         l = mid;       } else {         r = mid;       }     }     return (kek * mn[r] <= x ? r : kek * mn[l] <= x ? l : 0);   }   int main() {     n = readInt(), m = readInt();     for (int i = 1; i <= n; i++) {       a[i] = readInt();     }     for (int j = 1; j <= m; j++) {       b[j] = readInt();     }     x = readInt();     for (int i = 1; i <= n; i++) {       pref_a[i] = pref_a[i - 1] + a[i];     }     for (int i = 1; i <= m; i++) {       pref_b[i] = pref_b[i - 1] + b[i];     }     multiset<pair<int, int> > second;     for (int i = 1; i <= m; i++) {       mn[i] = MOD;     }     for (int i = 1; i <= m; i++) {       for (int j = i; j <= m; j++) {         mn[j - i + 1] = min(mn[j - i + 1], pref_b[j] - pref_b[i - 1]);       }     }     long long mx = 0;     for (int i = 1; i <= n; i++) {       for (int j = i; j <= n; j++) {         mx = max(mx, (j - i + 1) * GGGG(pref_a[j] - pref_a[i - 1]));       }     }     cout << mx;     return 0;   }   