func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename... Args>   void dbg(Args... args) {     ((cout << args <<    ), ...);   }   const int N = 110;   char t[N][N][N];   char f[N][N][N];   int main() {     int n, m, k;     cin >> n >> m >> k;     for (int x = 1; x <= n; ++x)       for (int y = 1; y <= m; ++y)         for (int z = 1; z <= k; ++z) {           cin >> t[x][y][z];           t[x][y][z] -=  0 ;         }     for (int x = 1; x <= n; ++x)       for (int y = 1; y <= m; ++y)         for (int z = 1; z <= k; ++z) {           if (!t[x][y][z]) continue;           bool tmp[3][3][3][3]{};           bool ok[3][3][3]{};           tmp[0][0][0][0] = 1, tmp[0][0][0][1] = 1, tmp[0][0][0][2] = 1;           ok[0][0][0] = 1;           for (int o = 0; o < 3; ++o)             for (int p = 0; p < 3; ++p)               for (int q = 0; q < 3; ++q)                 if (t[x + o][y + p][z + q]) {                   tmp[o][p][q][0] |= ((o > 0) ? ok[o - 1][p][q] : false);                   tmp[o][p][q][1] |= ((p > 0) ? ok[o][p - 1][q] : false);                   tmp[o][p][q][2] |= ((q > 0) ? ok[o][p][q - 1] : false);                   int good = tmp[o][p][q][0] + tmp[o][p][q][1] + tmp[o][p][q][2];                   ok[o][p][q] = good;                   if (good == 1) {                     if (o == 0 && p == 1 && q == 0 ||                         o == 0 && p == 0 && q == 1 ||                         o == 1 && p == 0 && q == 0 || o == 0 && p == 0 && q == 0)                       continue;                     if (o > 0 and ok[o - 1][p][q]) f[x + o - 1][y + p][z + q] = 1;                     if (p > 0 and ok[o][p - 1][q]) f[x + o][y + p - 1][z + q] = 1;                     if (q > 0 and ok[o][p][q - 1]) f[x + o][y + p][z + q - 1] = 1;                   }                 }         }     int cnt = 0;     for (int x = 1; x <= n; ++x)       for (int y = 1; y <= m; ++y)         for (int z = 1; z <= k; ++z) {           if (f[x][y][z] == 1) ++cnt;         }     dbg(cnt);   }   