func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Node {     int r, idx;   } p, q, t;   struct Fin {     int x, y, z;     Fin(){};     Fin(int _x, int _y, int _z) { x = _x, y = _y, z = _z; }   };   bool operator<(Node a, Node b) { return a.r < b.r; }   priority_queue<Node> que;   vector<Fin> vec;   vector<Node> tmp;   int main() {     int n, mini = 110;     scanf( %d , &n);     for (int i = 1; i <= n; i++)       scanf( %d , &p.r), p.idx = i, que.push(p), mini = min(mini, p.r);     while (1) {       tmp.clear();       tmp.push_back(que.top());       que.pop();       while (!que.empty()) {         if (tmp[0].r == que.top().r)           tmp.push_back(que.top()), que.pop();         else           break;       }       if (que.empty()) {         mini = tmp[0].r;         break;       }       if (tmp.size() == 1) tmp.push_back(que.top()), que.pop();       for (int i = 0; i < tmp.size(); i++) tmp[i].r = max(0, tmp[i].r - 1);       if (tmp.size() & 1) {         for (int i = 0; i < tmp.size() - 3; i += 2)           vec.push_back(Fin(tmp[i].idx, tmp[i + 1].idx, 0)), que.push(tmp[i]),               que.push(tmp[i + 1]);         vec.push_back(Fin(tmp[tmp.size() - 3].idx, tmp[tmp.size() - 2].idx,                           tmp[tmp.size() - 1].idx));         que.push(tmp[tmp.size() - 3]), que.push(tmp[tmp.size() - 2]),             que.push(tmp[tmp.size() - 1]);       } else         for (int i = 0; i < tmp.size(); i += 2)           vec.push_back(Fin(tmp[i].idx, tmp[i + 1].idx, 0)), que.push(tmp[i]),               que.push(tmp[i + 1]);     }     printf( %d n%d n , mini, vec.size());     for (int i = 0; i < vec.size(); i++) {       for (int j = 1; j <= n; j++) {         if (j == vec[i].x || j == vec[i].y || j == vec[i].z)           printf( 1 );         else           printf( 0 );       }       printf(  n );     }   }   