func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e3 + 5;   int n, deg[N], a[N];   bool ed[N][N];   void change(int u) {     for (int v = 0; v < n; v++) {       deg[u] -= ed[u][v], deg[u] += ed[u][v] ^= true;       deg[v] -= ed[v][u], deg[v] += ed[v][u] ^= true;     }   }   bool check() {     copy(deg, deg + n, a);     sort(a, a + n, greater<int>());     for (int i = 1, sum = a[0]; i < n; sum += a[i++])       if (sum == i * (i - 1) / 2 + i * (n - i)) return false;     return true;   }   int main() {     cin >> n;     for (int u = 0; u < n; u++)       for (int v = 0; v < n; v++) {         char c;         cin >> c;         deg[u] += ed[u][v] = c -  0 ;       }     if (check()) return cout <<  0 1 , 0;     int ted = 0;     for (int u = 0; u < n; change(u++)) change(u), ted += check();     if (ted) return cout <<  1   << ted, 0;     if (n == 6) return cout <<  2 18 , 0;     cout << -1;   }   