func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, m;   set<int> nx[1000100];   vector<pair<int, int> > nw;   int a[1000100];   vector<pair<int, int> > ans;   set<pair<int, int> > order;   set<pair<int, int> > lst;   int main() {     ios_base ::sync_with_stdio(0);     cin.tie();     cout.tie();     srand(23095);     cin >> n >> m;     for (int i = 0; i < m; i++) {       int x, y;       cin >> x >> y;       x--;       y--;       nx[x].insert(y);       nx[y].insert(x);       a[x]++;       a[y]++;     }     for (int i = 0; i < n; i++) {       a[i] = (a[i] / 2) + (a[i] % 2);       order.insert(make_pair(a[i], i));     }     while (!order.empty()) {       int v = order.begin()->second;       order.erase(order.begin());       nw.clear();       for (auto u : nx[v]) {         nw.push_back(make_pair(a[u], u));       }       sort(nw.rbegin(), nw.rend());       for (int j = 0; a[v] > 0; j++) {         a[v]--;         if (a[nw[j].second] > 0) {           order.erase(make_pair(a[nw[j].second], nw[j].second));         }         a[nw[j].second]--;         if (a[nw[j].second] > 0) {           order.insert(make_pair(a[nw[j].second], nw[j].second));         }         ans.push_back(make_pair(v, nw[j].second));         nx[v].erase(nw[j].second);         nx[nw[j].second].erase(v);       }     }     cout << ans.size() <<   n ;     for (auto i : ans) {       cout << i.first + 1 <<     << i.second + 1 <<   n ;     }     return 0;   }   