What is the mistake in my code of hostel vist

#include
#include<bits/stdc++.h>
#define ll long long
using namespace std;

void upheapify(vector &heap , ll int idx)
{
if(idx==0)
{
return;
}
ll int pidx= (idx-1)/2;
if(heap[pidx]<heap[idx])
{
ll int temp =heap[pidx];
heap[pidx]=heap[idx];
heap[idx]=temp;
upheapify(heap,pidx);
}
else
{
return;
}
}
void insert (vector &heap ,ll int key)
{
heap.push_back(key);
upheapify(heap ,heap.size()-1);
return;
}
int main() {
ll int t,k;
cin>>t>>k;
vector heap;
while(t!=0)
{
ll int q;
cin>>q;
if(q==1)
{
ll int x,y;
cin>>x>>y;
ll int dist = xx + yy;
insert(heap ,dist);
}
else{
cout<<heap[heap.size()-k]<<endl;
}
t–;
}
return 0;
}