func_code_string: #include <bits/stdc++.h>   using namespace std;   void print(vector<int> v) {     for (int i = 0; i < v.size(); i++) {       cout << v[i] <<    ;     }     cout <<   n ;     return;   }   bool isSubsetSum(vector<int> set, int n, int sum) {     bool subset[n + 1][sum + 1];     for (int i = 0; i <= n; i++) subset[i][0] = true;     for (int i = 1; i <= sum; i++) subset[0][i] = false;     for (int i = 1; i <= n; i++) {       for (int j = 1; j <= sum; j++) {         if (j < set[i - 1]) subset[i][j] = subset[i - 1][j];         if (j >= set[i - 1])           subset[i][j] = subset[i - 1][j] || subset[i - 1][j - set[i - 1]];       }     }     return subset[n][sum];   }   int main(int argc, char const *argv[]) {     ios_base::sync_with_stdio(false);     cin.tie(NULL);     int N;     cin >> N;     for (int I = 0; I < N; I++) {       int n;       cin >> n;       vector<int> v(2 * n);       for (int i = 0; i < 2 * n; i++) {         cin >> v[i];       }       int p = 0;       int t = v[0];       vector<int> temp;       for (int i = 0; i < 2 * n; i++) {         if (v[i] > t) {           t = v[i];           temp.push_back(i - p);           p = i;         }       }       temp.push_back(2 * n - p);       if (isSubsetSum(temp, temp.size(), n)) {         cout <<  YES               <<   n ;       } else {         cout <<  NO               <<   n ;       }     }     return 0;   }   