func_code_string: #include <bits/stdc++.h>   using namespace std;   string out;   long long int T;   unsigned canDo1[5000 / 32 + 1], canDo2[5000 / 32 + 1];   unsigned *cd1 = canDo1, *cd2 = canDo2, *sw;   int A[5000];   list<int> P;   int N;   void process() {     cin >> N;     N *= 2;     P.clear();     for (int i = 0; i < N; i++) cin >> A[i];     int ps = 0, p = 0;     for (int i = 0; i < N; i++)       if (A[i] <= A[ps])         p++;       else         P.push_back(p), ps = i, p = 1;     P.push_back(p);     for (int i = 0; i <= N / 32 + 1; i++) cd1[i] = cd2[i] = 0;     cd1[0] = cd2[0] = 1;     for (int p : P) {       for (int i = 0; i <= N; i++)         if ((cd2[i / 32] & 1 << i % 32) ||             (i >= p && (cd2[(i - p) / 32] & 1 << (i - p) % 32)))           cd1[i / 32] |= 1 << i % 32;       sw = cd1, cd1 = cd2, cd2 = sw;     }     out += (cd2[N / 2 / 32] & 1 << N / 2 % 32) ?  YES n  :  NO n ;   }   int main() {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     cin >> T;     for (int t = 1; t <= T; t++) process();     cout << out;     return 0;   }   