func_code_string: #include <bits/stdc++.h>   using namespace std;   struct Nod {     int mark, label;   } nod[200010];   int val[200010];   bool cmp1(Nod n1, Nod n2) {     if (n1.mark != n2.mark) return n1.mark > n2.mark;     return n1.label < n2.label;   }   bool cmp2(Nod n1, Nod n2) {     if (n1.mark != n2.mark) return n1.mark > n2.mark;     return n1.label > n2.label;   }   int main() {     int n, a, b;     scanf( %d , &n);     scanf( %d%d , &a, &b);     for (int i = 0; i < n; ++i) {       scanf( %d , &nod[i].mark);       nod[i].label = i;     }     if (a == b) {       for (int i = 1; i < n; ++i)         if (i <= n / 2)           printf( 1  );         else           printf( 2  );       printf( 2 n );       return 0;     }     if (a < b) {       sort(nod, nod + n, cmp1);       for (int i = 0; i < n; ++i) {         if (i < a)           val[nod[i].label] = 1;         else           val[nod[i].label] = 2;       }     } else {       sort(nod, nod + n, cmp2);       for (int i = 0; i < n; ++i) {         if (i < b)           val[nod[i].label] = 2;         else           val[nod[i].label] = 1;       }     }     for (int i = 0; i < n - 1; ++i) printf( %d  , val[i]);     printf( %d n , val[n - 1]);     return 0;   }   