func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 2e5 + 5;   int n, a[N], maxi[4 * N];   pair<int, int> p[N];   vector<int> v[3];   bool cmp(pair<int, int> p1, pair<int, int> p2) {     if (p1.first == p2.first)       return p1.second > p2.second;     else       return p1.first < p2.first;   }   void merge(int at) { maxi[at] = max(maxi[2 * at], maxi[2 * at + 1]); }   void build(int at, int L, int R) {     if (L == R) {       maxi[at] = 0;       return;     }     int mid = (L + R) / 2;     build(2 * at, L, mid);     build(2 * at + 1, mid + 1, R);     merge(at);   }   void update(int at, int L, int R, int pos, int val) {     if (L == R) {       maxi[at] = val;       return;     }     int mid = (L + R) / 2;     if (pos <= mid)       update(2 * at, L, mid, pos, val);     else       update(2 * at + 1, mid + 1, R, pos, val);     merge(at);   }   int query(int at, int L, int R, int l, int r) {     if (r < L || l > R) return 0;     if (l <= L && r >= R) return maxi[at];     int mid = (L + R) / 2;     int x = query(2 * at, L, mid, l, r);     int y = query(2 * at + 1, mid + 1, R, l, r);     return max(x, y);   }   int main() {     int n, n1, n2, n3, q, x;     scanf( %d %d %d , &n1, &n2, &n3);     ;     n = n1 + n2 + n3;     for (int j = 0; j < n1; j++) {       scanf( %d , &x);       v[0].push_back(x);     }     for (int j = 0; j < n2; j++) {       scanf( %d , &x);       v[1].push_back(x);     }     for (int j = 0; j < n3; j++) {       scanf( %d , &x);       v[2].push_back(x);     }     for (int i = 0; i < 3; i++) sort(v[i].begin(), v[i].end());     int cnt = 0;     for (int i = 0; i < 3; i++) {       for (int u : v[i]) {         p[cnt] = make_pair(u, cnt);         cnt++;       }     }     sort(p, p + n, cmp);     build(1, 0, n - 1);     int maxi = 0;     for (int i = 0; i < n; i++) {       int tmp = query(1, 0, n - 1, 0, p[i].second - 1);       maxi = max(maxi, tmp + 1);       update(1, 0, n - 1, p[i].second, tmp + 1);     }     printf( %d n , n - maxi);   }   