func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long int maxn = 1e6 + 1;   const long long int modn = 1e9 + 7;   long long int T, len, num, gav, ver, x, maxi, sum, fir, sec, out, th;   vector<long long int> vec[maxn];   bool is_use[maxn];   long long int all[maxn];   void dfs(long long int x) {     is_use[x] = true;     sum++;     for (int i = 0; i < vec[x].size(); i++) {       ver = vec[x][i];       if (is_use[ver] == false) dfs(ver);     }     return;   }   int main() {     std::ios_base::sync_with_stdio(false);     cin >> len >> num >> gav;     for (int i = 1; i <= gav; i++) cin >> all[i];     for (int i = 1; i <= num; i++) {       cin >> fir >> sec;       vec[fir].push_back(sec);       vec[sec].push_back(fir);     }     for (int i = 1; i <= gav; i++) {       sum = 0;       dfs(all[i]);       out += (sum * (sum - 1)) / 2;       maxi = max(maxi, sum);     }     sum = 0;     for (int i = 1; i <= len; i++) {       if (is_use[i] == false) sum++;     }     out += (sum * (sum - 1)) / 2 + sum * maxi;     cout << out - num;     return 0;   }   