For this Question: Given an unsorted array A of size N of non-negative integers, find a continuous sub-array which adds to a given number S.Each test case consists of two lines. The first line of each test case is N and S, where N is the size of the array and S is the sum. The second line of each test case contains N space-separated integers denoting the array elements.

<b>Constraints:-</b>
1 &le; N &le; 10<sup>5</sup>
1 &le; Ai &le; 10<sup>5</sup>Print the starting and ending positions (1 indexing) of first such occurring subarray from the left if sum equals to subarray, else print -1.Sample Input
5 12
1 2 3 7 5

Sample Output
2 4

Explanation:
subarray starting from index 2 and ending at index 4 => {2 , 3 , 7} 
sum = 2 + 3 + 7 = 12

Sample Input
10 15
1 2 3 4 5 6 7 8 9 10

Sample Output
1 5, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
int n,k;
cin>>n>>k;
int a[n];

for(int i=0;i<n;i++)
{

    cin>>a[i];
}
int sum=0;
unordered_map<int,int> m;
for(int i=0;i<n;i++){
 sum+=a[i];
 if(sum==k){cout<<1<<" "<<i+1;return 0;}
if(m.find(sum-k)!=m.end()){
    cout<<m[sum-k]+2<<" "<<i+1;
    return 0;
}
m[sum]=i;
}
cout<<-1;

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