func_code_string: #include <bits/stdc++.h>   using namespace std;   int d[1005][1005], sum, res, s, n;   int main() {     scanf( %d , &n);     for (int res = 3; res <= 100; res++) {       memset(d, 0, sizeof(d)), sum = 0;       for (int i = 1; i <= res; i++) {         for (int j = 1; j < i; j++) {           if (sum <= n) {             int now = 0;             for (int k = 1; k <= res; k++)               if (i != k and j != k and d[i][k] and d[j][k]) now++;             if (sum + now <= n) {               sum += now;               d[i][j] = d[j][i] = 1;             }             if (sum == n) {               cout << res << endl;               for (int i1 = 1; i1 <= res; i1++) {                 for (int j1 = 1; j1 <= res; j1++) cout << d[i1][j1];                 printf(  n );               }               return 0;             }           }         }       }     }     return 0;   }   