func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 154321;   int n, m, r, k, row[N], col[N];   long long ans = 0;   struct node {     int a, b;     long long val;     bool operator<(const node &rhs) const { return val < rhs.val; }   };   priority_queue<node> pq;   int main() {     cin >> n >> m >> r >> k;     for (int i = 1; i <= n; ++i) {       int lo = max(1, i - r + 1);       int hi = min(n - r + 1, i);       row[i] = (hi - lo + 1);     }     for (int i = 1; i <= m; ++i) {       int lo = max(1, i - r + 1);       int hi = min(m - r + 1, i);       col[i] = (hi - lo + 1);     }     sort(row + 1, row + n + 1);     sort(col + 1, col + m + 1);     for (int i = 1; i <= n; ++i) {       node cur;       cur.a = i;       cur.b = m;       cur.val = (1LL * row[i] * col[m]);       pq.push(cur);     }     for (int i = 1; i <= k; ++i) {       node cur = pq.top();       pq.pop();       ans += cur.val;       if (cur.b > 1) {         --cur.b;         cur.val = (1LL * row[cur.a] * col[cur.b]);         pq.push(cur);       }     }     cout << fixed << setprecision(12);     cout << (long double)ans / (long double)(1LL * (n - r + 1) * (m - r + 1))          <<   n ;     return 0;   }   