My code is not working

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
set s;
vectorv;
int Q,K;
cin>>Q>>K;
for(int i=1;i<=Q;i++)
{
int temp;
cin>>temp;
if(temp==1)
{
int x,y;
cin>>x>>y;
ll prin=(xx)+(yy);
s.insert(prin);

	}
	if (temp==2)
	{  
	
	auto it=s.begin();

	for (int i=0;i<(K-1);i++)
	{
		
		it++;
	}
	
	v.push_back(*it);
	
	
	}
}
for(auto a=v.begin();a!=v.end();a++)
{
	cout<<*a<<endl;
}

}