func_code_string: #include <bits/stdc++.h>   using namespace std;   template <typename T>   ostream& operator<<(ostream& _s, vector<T> _t) {     for (int i = 0; i < (int)(_t.size()); i++) _s << (i ?     :   ) << _t[i];     return _s;   }   template <typename T>   istream& operator>>(istream& _s, vector<T>& _t) {     for (int i = 0; i < (int)(_t.size()); i++) _s >> _t[i];     return _s;   }   template <typename T, typename U>   ostream& operator<<(ostream& _s, pair<T, U> _t) {     _s <<  (  << _t.first <<  ,  << _t.second <<  ) ;     return _s;   }   template <typename T, typename U>   istream& operator>>(istream& _s, pair<T, U>& _t) {     _s >> _t.first >> _t.second;     return _s;   }   int find(const vector<int>& v, int value, int fr, int to) {     for (int i = fr; i < (int)(to + 1); i++) {       if (v[i] == value) {         return i;       }     }     assert(false);   }   vector<int> invert(const vector<int>& v) {     vector<int> res(v.size());     for (int i = 0; i < (int)(v.size()); i++) {       res[v[i]] = i;     }     return res;   }   int main() {     ios_base::sync_with_stdio(false);     int n;     cin >> n;     vector<int> p(n);     cin >> p;     for (int i = 0; i < (int)(n); i++) p[i]--;     bool is_id = true;     for (int i = 0; i < (int)(n); i++) {       if (p[i] != i) is_id = false;     }     string base_s;     for (int j = 0; j < (int)(n); j++) base_s +=  . ;     vector<string> res(n);     for (int i = 0; i < (int)(n); i++) res[i] = base_s;     if (is_id) {       cout << n << endl;       for (int i = 0; i < (int)(n); i++) {         cout << base_s << endl;       }       return 0;     }     p = invert(p);     int fr = 0, to = n - 1;     for (int row = 0; row < (int)(n); row++) {       if (row == 0) {         int mid = n / 2;         int pos = find(p, mid, fr, to);         for (int i = fr; i < (int)(pos + 1); i++) {           res[row][i] =     ;         }         for (int i = (pos)-1; i >= (int)(fr); i--) {           p[i + 1] = p[i];         }         p[fr] = -1;       } else {         bool left = row % 2 == 1;         int free_pos = left ? fr : to;         assert(p[free_pos] == -1);         int pos = find(p, free_pos, fr, to);         if (left) {           res[row][fr] =  / ;           for (int i = pos; i < (int)(to + 1); i++) {             res[row][i] =  / ;           }           for (int i = pos; i < (int)(to); i++) {             p[i] = p[i + 1];           }           p[to] = -1;           fr++;         } else {           res[row][to] =     ;           for (int i = fr; i < (int)(pos + 1); i++) {             res[row][i] =     ;           }           for (int i = (pos)-1; i >= (int)(fr); i--) {             p[i + 1] = p[i];           }           p[fr] = -1;           to--;         }       }     }     cout << (n - 1) << endl;     for (int i = 0; i < (int)(n); i++) {       cout << res[i] << endl;     }   }   