func_code_string: #include <bits/stdc++.h>   using namespace std;   string mt[1226], sc[1226], s[51], q1, q2;   int n, k1, k2, c;   map<string, int> O, Z, P;   pair<pair<pair<int, int>, int>, string> p[51];   vector<string> v;   int main() {     cin >> n;     for (int i = 1; i <= n; i++) {       cin >> s[i];     }     for (int i = 1; i <= n * (n - 1) / 2; i++) {       cin >> mt[i] >> sc[i];       c = 0;       k1 = 0;       k2 = 0;       q1 =   ;       q2 =   ;       for (int j = 0; j < sc[i].size(); j++) {         if (sc[i][j] ==  : ) {           c++;           continue;         }         if (c == 0) {           k1 += sc[i][j] -  0 ;           k1 *= 10;         } else {           k2 += sc[i][j] -  0 ;           k2 *= 10;         }       }       k1 /= 10;       k2 /= 10;       c = 0;       for (int j = 0; j < mt[i].size(); j++) {         if (mt[i][j] ==  - ) {           c++;           continue;         }         if (c == 0) {           q1 += mt[i][j];         }         if (c == 1) {           q2 += mt[i][j];         }       }       if (k1 > k2) {         O[q1] += 3;       } else if (k1 < k2) {         O[q2] += 3;       } else {         O[q1]++;         O[q2]++;       }       Z[q1] += k1;       Z[q2] += k2;       P[q1] += k2;       P[q2] += k1;     }     for (int i = 1; i <= n; i++) {       p[i] = make_pair(make_pair(make_pair(O[s[i]], Z[s[i]] - P[s[i]]), Z[s[i]]),                        s[i]);     }     sort(p + 1, p + 1 + n);     for (int i = n; i >= n / 2 + 1; i--) {       v.push_back(p[i].second);     }     sort(v.begin(), v.end());     for (int i = 0; i < v.size(); i++) {       cout << v[i] <<   n ;     }     return 0;   }   