For this Question: You are given an array A of length N. The interesting value of a subarray is defined as the product of the maximum and minimum elements of the subarray. Find the minimum and maximum interesting value over all subarrays for the given array.
Note: A subarray is obtained by deletion of several (possibly zero) elements from the beginning of the array and several (possibly zero) elements from the end of the array.The first line of input will contain a single integer T, denoting the number of test cases. The first line of each test case contains an integer N - the length of the array A. The second line of each test case contains N space- separated integers A<sub>1</sub>, A<sub>2</sub>,...., A<sub>N</sub>.

<b>Constraints</b>
1 &le; T &le; 100
1 &le; N &le; 10<sup>5</sup>
-10<sup>9</sup> &le; A<sub>i</sub> &le; 10<sup>9</sup>
The sum of N over all test cases won't exceed 3.10<sup>5</sup>For each test case, output two space- separated integers on a new line the minimum and maximum interesting value over all subarrays for the given array.Sample Input :
2
2
2 2
3
5 0 9
Sample Output :
4 4
0 81
Explanation :
<ul><li>The minimum interesting value possible is 4. A subarray with interesting value equal to 4 is [2, 2]. Here, both minimum and maximum elements of the subarray are 2. It can be proven that no subarray of the array has interesting value less than 4. The maximum interesting value possible is 4. A subarray with interesting value equal to 4 is [2, 2]. Here, both minimum and maximum elements of the subarray are 2. It can be proven that no subarray of the array has interesting value greater than 4. </li><li>The minimum interesting value possible is 0. A subarray with interesting value equal to 00 is [5, 0, 9]. Here, minimum element is 0 and maximum element is 9. It can be proven that no subarray of the array has interesting value less than 0. The maximum interesting value possible is 81. A subarray with interesting value equal to 81 is [9]. Here, both minimum and maximum elements of the subarray are 9. It can be proven that no subarray of the array has interesting value more than 81., I have written this Solution Code: #include <bits/stdc++.h>

#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>

using namespace std;
using namespace __gnu_pbds;

template <class T>
using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;

template <class key, class value, class cmp = std::less<key>>
using ordered_map = tree<key, value, cmp, rb_tree_tag, tree_order_statistics_node_update>;
// find_by_order(k)  returns iterator to kth element starting from 0;
// order_of_key(k) returns count of elements strictly smaller than k;

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 2351
#endif

#define int long long

mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());

inline int64_t random_long(long long l = LLONG_MIN, long long r = LLONG_MAX) {
    uniform_int_distribution<int64_t> generator(l, r);
    return generator(rng);
}

const int N = 100;
vector<int> adj[N];

int dfs(int u, int dest, map<pair<int, int>, int> weight, vector<int> &visited) {
    visited[u] = true;
    if (u == dest) {
        return 0;
    }
    int ans = 1e18;
    for (int v : adj[u]) {
        if (!visited[v]) {
            debug(weight[{u, v}]);
            ans = min(ans, weight[{u, v}] + dfs(v, dest, weight, visited));
        }
    }
    return ans;
}

int32_t main() {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
    auto start = std::chrono::high_resolution_clock::now();

    int tt;
    cin >> tt;
    while (tt--) {
        int n;
        cin >> n;
        vector<int> a(n);
        for (int i = 0; i < n; i++) {
            cin >> a[i];
        }
        sort(a.begin(), a.end());
        long long mmx, mmn;
        mmx = max(a[0] * a[0] * 1LL, a[n - 1] * a[n - 1] * 1LL);
        mmx = max(mmx, a[0] * a[n - 1] * 1LL);
        mmn = min(a[0] * a[0] * 1LL, a[n - 1] * a[n - 1] * 1LL);
        mmn = min(mmn, a[0] * a[n - 1] * 1LL);
        cout << mmn << " " << mmx << "\n";
    }

    auto stop = std::chrono::high_resolution_clock::now();
    auto duration = std::chrono::duration_cast<std::chrono::nanoseconds>(stop - start);
    cerr << "Time taken : " << ((long double)duration.count()) / ((long double)1e9) << "s\n";

    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?