For this Question: Write a program to find out the shortest distance between two even positive integers in an array <b>A</b> and print the distance. If there is one or zero even positive integers in the array then return -1.

<b>Note</b>: If the index of one even positive integer is i and the index of another even positive integer is j then their distance will be |i- j|.The first line of the input contains N denoting the size of the array.
The second line of the input contains N space- separated integers denoting an array A.

<b>Constraints</b>
1 &le; N &le; 10<sup>5</sup>
-10<sup>9</sup> &le; A[i] &le; 10<sup>9</sup>Print the shortest distance if more than one even positive integer is present or return -1 if only one or no even positive integer is present<b>Sample Input</b>
2
1 2
<b>Sample Output</b>
-1
<b>Explanation</b>
There is only 1 even positive integer in the array. So the output will be -1., I have written this Solution Code: #include <bits/stdc++.h>

using namespace std;

int shortEven(int n, vector<int> &arr) {
    // write code here
    vector<int> even;
    for (int i = 0; i < n; i++) {
        if (!(arr[i] & 1) and arr[i] > 0) {
            even.push_back(i);
        }
    }
    if (even.size() <= 1) {
        return -1;
    } else {
        int ans = INT_MAX;
        for (int i = 1; i < even.size(); i++) {
            ans = min(abs(even[i] - even[i - 1]), ans);
        }
        return ans;
    }
}

int main() {
    int n;
    cin >> n;
    vector<int> arr(n);
    for (int i = 0; i < n; ++i) {
        cin >> arr[i];
    }
    int ans = shortEven(n, arr);
    cout << ans << "\n";
    return 0;
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?