func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Tans {     long a;     long b;   };   struct mstr {     long num;     long val;   };   bool operator<(mstr a, mstr b) { return a.val < b.val; }   bool operator>(mstr a, mstr b) { return a.val > b.val; }   bool operator==(mstr a, mstr b) { return a.val == b.val; }   int main() {     long n, s;     cin >> n >> s;     vector<mstr> cards(n);     vector<Tans> ress;     priority_queue<mstr> q;     ress.reserve(n);     for (long i = 0; i < n; i++) {       cin >> cards[i].val;       cards[i].num = i + 1;       if (cards[i].val) q.push(cards[i]);     }     bool f = true;     vector<mstr> temp;     while (q.size() != 0 && f) {       temp.resize(0);       temp.reserve(q.size());       mstr now = q.top();       q.pop();       if (q.size() < now.val)         f = false;       else {         mstr tt;         Tans ttt;         ttt.a = now.num;         while (now.val != 0) {           tt = q.top();           q.pop();           now.val--;           tt.val--;           ttt.b = tt.num;           temp.push_back(tt);           ress.push_back(ttt);         }         for (long j = 0; j < temp.size(); j++)           if (temp[j].val > 0) q.push(temp[j]);       }     }     if (f == false)       cout <<  No ;     else {       cout <<  Yes n  << ress.size() <<   n ;       for (long i = 0; i < ress.size(); i++)         cout << ress[i].a <<     << ress[i].b <<   n ;     }     return 0;   }   