func_code_string: #include <bits/stdc++.h>   using namespace std;   const long long inf = 1e9 + 7;   const long long mxN = 1e5 + 1;   vector<long long> dat;   long long arr[4000], n;   bool dp[2001];   void solve() {     cin >> n;     n *= 2;     long long p = 0, temp = 0;     for (long long i = 0; i < n; i++) {       cin >> arr[i];     }     dat.clear();     long long i = 0;     while (i < n) {       long long j = i + 1;       while (j < n && arr[i] > arr[j]) {         j++;       }       dat.push_back(j - i);       i = j;     }     memset(dp, 0, sizeof(dp));     dp[0] = true;     for (long long i = 0; i < dat.size(); i++) {       for (long long j = n / 2; j >= 0; j--) {         if (j + dat[i] <= n / 2) dp[j + dat[i]] = dp[j] | dp[j + dat[i]];       }     }     dp[n / 2] ? cout <<  YES n  : cout <<  NO n ;   }   signed main() {     ios::sync_with_stdio(0);     cin.tie(0);     long long T = 1, t = 0;     cin >> T;     while (t++ < T) {       solve();     }   }   