For this Question: You are given candies of different sizes and their respective count. There are many students standing in a line. Each student is given a single candy one by one in non- decreasing order of size of candy. Given the position P of a student in the line, find the size of the candy he will receive. 
Print -1 if the student does not receive any candy.The first line contains two integers N and P.
The second line contains N space seperated integers A<sub>i</sub>, the size of i<sup>th</sup> candy.
The third line contains N space seperated integers B<sub>i</sub>, the count of i<sup>th</sup> candy.

Constraints:
1 <= N <= 10<sup>5</sup>
1 <= A<sub>i</sub>, B<sub>i</sub> <= 10<sup>9</sup>
1 <= P <= 10<sup>14</sup>Find the size of the candy the student at position P will receive. If the student doesn't receive any candy, print -1.Sample Input:
5 10
1 2 3 4 5 
1 2 3 4 5 

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

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