func_code_string: #include <bits/stdc++.h>   using namespace std;   const int maxn = 500055;   int n, m, r, k;   set<pair<int, int> > rec;   const int dir[2][4] = {{0, 0, 1, -1}, {1, -1, 0, 0}};   struct node {     int x, y, val;     node() {}     node(int _x, int _y, int _val) : x(_x), y(_y), val(_val){};     bool operator<(const node &b) const { return val < b.val; }   };   int calc(int x, int y) {     int x_lb = max(0, x - r + 1), x_ub = min(n - 1, x + r - 1);     int y_lb = max(0, y - r + 1), y_ub = min(m - 1, y + r - 1);     int res = (x_ub - x_lb + 2 - r) * (y_ub - y_lb + 2 - r);     if (res <= 0) {       cout <<  x  <<  =  << x <<   ,  , cout <<  y  <<  =  << y <<   ,  ,           cout <<  y_lb  <<  =  << y_lb <<   ,  ,           cout <<  r  <<  =  << r <<   ,  , cout <<  y_ub  <<  =  << y_ub << endl;     }     return res;   }   void solve() {     priority_queue<node> q;     int tmp = calc(n / 2, m / 2);     q.push(node(n / 2, m / 2, tmp));     rec.insert(make_pair(n / 2, m / 2));     double res = 0;     while (!q.empty() && k--) {       node cur = q.top();       q.pop();       res += cur.val;       for (int i = 0; i < (4); ++i) {         int tx = dir[0][i] + cur.x, ty = dir[1][i] + cur.y;         if (tx > -1 && ty > -1 && tx < n && ty < m &&             !rec.count(pair<int, int>(tx, ty))) {           rec.insert(pair<int, int>(tx, ty));           q.push(node(tx, ty, calc(tx, ty)));         }       }     }     double ans = res / (n - r + 1) / (m - r + 1);     printf( %.10lf n , ans);   }   int main() {     cin >> n >> m >> r >> k;     solve();   }   