func_code_string: #include <bits/stdc++.h>   using namespace std;   int n, a[2 * 2005], pos[2 * 2005], dp[2 * 2005][2 * 2005];   int call(int p, int len) {     if (p > 2 * n) return len == n;     if (len < n) return 0;     int &ret = dp[p][len];     if (~ret) return ret;     ret = call(p + pos[p], len);     ret += call(p + pos[p], len - pos[p]);     return ret;   }   int main() {     ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);     int tc;     cin >> tc;     while (tc--) {       cin >> n;       for (int i = 1; i <= 2 * n; i++) {         cin >> a[i];       }       for (int i = 1; i <= 2 * n; i++) {         int cnt = 1;         for (int j = i + 1; j <= 2 * n; j++) {           if (a[i] > a[j])             cnt++;           else             break;         }         pos[i] = cnt;       }       for (int i = 1; i <= 2 * n; i++)         for (int j = 1; j <= 2 * n; j++) dp[i][j] = -1;       if (call(1, 2 * n))         cout <<  YES n ;       else         cout <<  NO n ;     }     return 0;   }   