For this Question: You are given an array A of size N. Find the number of indexes i (1 <= i <= N) such that the sum of the elements to its right is atmost equal to the sum of elements to its left.The first line of input contains N, the size of the array.
The second line of input contains N space seperated integers A<sub>i</sub>.

Constraints:
1 <= N <= 10<sup>5</sup>
-10<sup>9</sup> <= A<sub>i</sub> <= 10<sup>9</sup>Print the number of indexes i (1 <= i <= N) such that the sum of the elements to its right is atmost equal to the sum of elements to its left.Sample Input:
5
3 -2 4 -1 4

Sample Output:
2, I have written this Solution Code: #include<bits/stdc++.h>
using namespace std;
#define int long long
using T = pair<int, int>;

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