# include<iostream>
# include<queue>
using namespace std;
struct NODE
{
int i,j;
friend bool operator > (const NODE& N1, const NODE& N2)
{
return N1.i>N2.i;
}
friend bool operator < (const NODE& N1, const NODE& N2)
{
return N1.i<N2.i;
}
};
int main()
{
priority_queue<int, vector<int>, less<int> > pq1;
priority_queue<NODE, vector<NODE>, less<NODE> > pq2;
pq1.push(3);
pq1.push(5);
pq1.push(2);
cout<<pq1.top()<<endl;
NODE n,nn;
n.i=3,n.j=1;
pq2.push(n);
n.i=5,n.j=2;
pq2.push(n);
n.i=2,n.j=3;
pq2.push(n);
nn=pq2.top();
cout<<nn.i<<" "<<nn.j<<endl;
return 0;
}