func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 1e5 + 10, mod = 1e9 + 7, L = 20;   vector<int> G[N], g[N];   int h[N], x[5 * N], y[5 * N], par[N][L];   map<int, bool> mp[N];   void dfs(int v, int p) {     par[v][0] = p;     for (int i = 1; i < L; i++) par[v][i] = par[par[v][i - 1]][i - 1];     for (int u : g[v])       if (u != p && h[u] == -1) h[u] = h[v] + 1;     for (int u : g[v])       if (h[u] == h[v] + 1) dfs(u, v);   }   int pr(int v, int x) {     for (int i = 0; i < L; i++)       if ((1 << i) & x) v = par[v][i];     return v;   }   int lca(int u, int v) {     if (h[u] > h[v]) swap(u, v);     v = pr(v, h[v] - h[u]);     if (u == v) return v;     for (int i = L - 1; i >= 0; i--)       if (par[v][i] != par[u][i]) u = par[u][i], v = par[v][i];     return par[v][0];   }   int solve(int u, int v) {     int p = lca(u, v);     int ret = h[u] + h[v] - 2 * h[p];     if (p == u || p == v) return ret;     int x = pr(u, h[u] - h[p] - 1), y = pr(v, h[v] - h[p] - 1);     if (x > y) swap(x, y);     if (mp[x][y]) ret--;     return ret;   }   int32_t main() {     ios_base::sync_with_stdio(false);     cin.tie(0);     cout.tie(0);     memset(h, -1, sizeof(h));     int n, m, q;     cin >> n >> m >> q;     h[0] = 0;     for (int i = 0; i < m; i++) {       cin >> x[i] >> y[i];       x[i]--;       y[i]--;       if (x[i] > y[i]) swap(x[i], y[i]);       g[x[i]].push_back(y[i]);       g[y[i]].push_back(x[i]);       mp[x[i]][y[i]] = true;     }     dfs(0, 0);     for (int i = 0; i < q; i++) {       int x, y;       cin >> x >> y;       x--;       y--;       cout << solve(x, y) <<   n ;     }     return 0;   }   