func_code_string: #include <bits/stdc++.h>   using namespace std;   mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());   const int MOD = 1e9 + 7;   vector<int> check(int n, vector<int> a, int x) {     multiset<int> as;     for (auto u : a) {       as.insert(u);     }     vector<int> res;     for (int i = 0; i < n; ++i) {       auto it1 = as.end();       it1--;       int y = x - *it1;       as.erase(it1);       auto it2 = as.find(y);       if (it2 == as.end()) {         return {};       }       res.push_back(x - y);       res.push_back(y);       x = max(y, x - y);       as.erase(it2);     }     return res;   }   const int N = 3505;   int n, m, k;   int arr[N];   int get(int p, int s) {     int ans = (1 << 30);     for (int j = p; j + s <= m - 1; j++) {       ans = min(ans, max(arr[j], arr[n - (m - 1 - j) - 1]));     }     return ans;   }   int main() {     int t;     scanf( %d , &t);     while (t--) {       scanf( %d %d %d , &n, &m, &k);       k = min(k, m - 1);       int ans = 0;       for (int i = 0; i < n; i++) scanf( %d , &arr[i]);       for (int i = 0; i <= k; i++) ans = max(ans, get(i, k - i));       printf( %d n , ans);     }     return 0;   }   