For this Question: You are given an array A of size N. Over all pairs of (l, r) (1 <= l < r <= n), find the maximum value of max(A<sub>l</sub>, A<sub>l+1</sub>,... , A<sub>r</sub>) * min(A<sub>l</sub>, A<sub>l+1</sub>,... , A<sub>r</sub>).The first line of the input contains a single integer N.
The second line of the input contains N space seperated integers.

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>9</sup>Over all pairs of (l, r) (1 <= l < r <= n), print the maximum value of max(A<sub>l</sub>, A<sub>l+1</sub>,. , A<sub>r</sub>) * min(A<sub>l</sub>, A<sub>l+1</sub>,. , A<sub>r</sub>).Sample Input:
4
2 3 2 1

Sample Output:
6

Explaination:
Let l = 1, r = 3
max = 3, min = 2
value = 3*2 = 6.
It can be verified that this is the maximum such value possible., I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
#define int long long

signed main(){
    int n;
    cin >> n;
    vector<int> a(n);
    for(auto &i : a) cin >> i;
    int ans = 0;
    for(int i = 1; i < n; i++){
        ans = max(ans, a[i] * a[i - 1]);
    }
    cout << ans;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?