func_code_string: #include <bits/stdc++.h>   using namespace std;   const int INF = 1e9;   const long long LINF = 1e18;   int n, m, k;   bool noted[13];   bool connected[13][13];   int cnt = 0;   set<long long> st;   set<set<int>> sets;   vector<int> vec[13];   long long pw[13];   bool visitedd[13];   map<long long, bool> visiteddd[13][13];   void bruteforce_string(int u, int v, int d, long long code) {     if (d == n / 2) {       if (!connected[u][v]) return;       cnt++;       st.insert(code);       return;     }     for (int x : vec[u])       for (int y : vec[v]) {         if (x == y) continue;         if (visitedd[x] || visitedd[y]) continue;         long long nx = min(x, y);         long long ny = max(x, y);         long long ncode = code + (ny << (4LL * nx));         if (!visiteddd[nx][ny][ncode]) {           visiteddd[nx][ny][ncode] = 1;           visitedd[x] = 1;           visitedd[y] = 1;           bruteforce_string(nx, ny, d + 1, ncode);           visitedd[x] = 0;           visitedd[y] = 0;         }       }   }   int cnt2 = 0;   map<set<int>, bool> visited;   void bruteforce_striling(set<int> st) {     visited[st] = 1;     if (st.size() == 1) return;     for (auto it = st.begin(); it != st.end(); it++) {       auto jt = it;       ++jt;       for (; jt != st.end(); jt++) {         set<int> nt = st;         nt.erase(*it);         nt.erase(*jt);         nt.insert(*it + *jt);         if (!visited[nt]) bruteforce_striling(nt);       }     }   }   long long P(int n, int k) {     long long res = 1;     for (int i = 0; i < k; i++) res = (res * (n - i));     return res;   }   int main() {     pw[0] = 1;     for (int i = 1; i <= 12; i++) pw[i] = pw[i - 1] * 13;     scanf( %d %d %d n , &n, &m, &k);     for (int i = 1; i <= m; i++) {       int u, v;       scanf( %d %d , &u, &v);       vec[u].push_back(v);       vec[v].push_back(u);       connected[u][v] = connected[v][u] = 1;     }     for (int i = 1; i <= n; i++) {       for (int j = i + 1; j <= n; j++) {         visitedd[i] = 1;         visitedd[j] = 1;         bruteforce_string(i, j, 1, ((1LL * j) << (4 * i)));         visitedd[i] = 0;         visitedd[j] = 0;       }     }     for (auto it : st) {       set<int> temp;       for (int i = 1; i <= 12; i++) {         int u = i;         int v = ((it >> (4LL * i)) & 15);         if (v) temp.insert((1 << u) + (1 << v));       }       sets.insert(temp);     }     for (auto it : sets) {       if (!visited[it]) bruteforce_striling(it);     }     long long res = 0;     for (auto it : visited) {       res += P(k, it.first.size());     }     printf( %lld n , res);   }   