func_code_string: #include <bits/stdc++.h>   using namespace std;   int N, M, cnt, maxi;   char c;   int star[105][105];   int lefted[105][105];   int righted[105][105];   int up[105][105];   int down[105][105];   int chk[105][105];   struct ryunha {     int x, y, r;   } ans;   vector<ryunha> res;   int main(void) {     cin >> N >> M;     for (int i = 1; i <= N; i++) {       for (int j = 1; j <= M; j++) {         cin >> c;         while (c !=  .  && c !=  * ) cin >> c;         star[i][j] = (c ==  .  ? 0 : 1);         if (c ==  * ) chk[i][j] = 1;       }     }     for (int i = 1; i <= N; i++) {       cnt = 0;       for (int j = 1; j <= M; j++) {         if (star[i][j])           cnt++;         else           cnt = 0;         lefted[i][j] = cnt;       }     }     for (int i = 1; i <= N; i++) {       cnt = 0;       for (int j = M; j >= 1; j--) {         if (star[i][j])           cnt++;         else           cnt = 0;         righted[i][j] = cnt;       }     }     for (int j = 1; j <= M; j++) {       cnt = 0;       for (int i = 1; i <= N; i++) {         if (star[i][j])           cnt++;         else           cnt = 0;         up[i][j] = cnt;       }     }     for (int j = 1; j <= M; j++) {       cnt = 0;       for (int i = N; i >= 1; i--) {         if (star[i][j])           cnt++;         else           cnt = 0;         down[i][j] = cnt;       }     }     for (int i = 1; i <= N; i++) {       for (int j = 1; j <= M; j++) {         if (star[i][j]) {           maxi = min({lefted[i][j], righted[i][j], up[i][j], down[i][j]});           int change = 0;           if (maxi >= 2) {             if (chk[i][j]) chk[i][j] = 0, change = 1;             for (int k = 1; k <= maxi - 1; k++) {               if (chk[i + k][j]) chk[i + k][j] = 0, change = 1;               if (chk[i - k][j]) chk[i - k][j] = 0, change = 1;               if (chk[i][j - k]) chk[i][j - k] = 0, change = 1;               if (chk[i][j + k]) chk[i][j + k] = 0, change = 1;             }           }           if (change) {             ans.x = i;             ans.y = j;             ans.r = maxi - 1;             res.push_back(ans);           }         }       }     }     for (int i = 1; i <= N; i++) {       for (int j = 1; j <= M; j++) {         if (chk[i][j]) return !printf( -1 );       }     }     printf( %d n , res.size());     for (int i = 0; i < res.size(); i++)       printf( %d %d %d n , res[i].x, res[i].y, res[i].r);   }   