func_code_string: #include <bits/stdc++.h>   using namespace std;   int n;   const int N = 4010;   int v[N], idx, f[N];   int last;   void init() {     for (int i = 0; i <= 2 * n; i++) f[i] = v[i] = 0;     last = idx = 0;   }   int main() {     ios::sync_with_stdio(false);     cin.tie();     cout.tie(0);     int T;     cin >> T;     while (T--) {       init();       cin >> n;       for (int i = 0; i < 2 * n; i++) {         int x;         cin >> x;         if (x > last) {           idx++;           last = x;         }         v[idx]++;       }       for (int i = 1; i <= idx; i++)         for (int j = n; j >= v[i]; j--) f[j] = max(f[j], f[j - v[i]] + v[i]);       if (f[n] == n)         cout <<  YES  << endl;       else         cout <<  NO  << endl;     }     return 0;   }   