#include#include #include #include #include #include using namespace std; class Node{ public: int x, y; Node( int a= 0, int b= 0 ):x(a),y(b) {} bool operator<(Node m)const{ return x b.y; return a.x> b.x; } */ int main() { priority_queueq; vector qq; for( int i= 0; i< 10; ++i ){ q.push( Node( rand(), rand() ) ); qq.push_back( Node( rand(),rand() ) ); } sort(qq.begin(),qq.end()); printf("The result of q is :\n"); while( !q.empty() ) { cout << q.top().x << ' ' << q.top().y << endl; q.pop(); } printf("The result of qq is :\n"); for(int i=0;i