For this Question: You are given an array A of size N. Find the smallest index i (1 <= i <= N) such that the sum of the first i elements is greater than or equal to the sum of the rest of the elements of the array.The first line of the input contains a single integer N.
The second line of the input contains N space-separated integers.

<b>Constraints:</b>
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub> <= 10<sup>9</sup>Print the smallest index i (1 <= i <= N) such that the sum of the first i elements is greater than or equal to the sum of the rest of the elements of the array.Sample Input:
5
6 4 7 9 2

Sample Output:
3

<b>Explanation:</b>
Sum upto i = 3 -> 17
Some of the rest of the array -> 11, 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);
    int sum = 0; 
    for(auto &i : a) cin >> i, sum += i;
    int cur = 0;
    for(int i = 0; i < n; i++){
        cur += a[i];
        sum -= a[i];
        if(cur >= sum){
            cout << i+1;
            return 0;
        }
    }
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?