#include #include #include #include struct E1{ int xL; int no; bool operator<(const E1& e1)const{ return xL>e1.xL; } }; struct E2{ int xR,y,no; bool operator<(const E2& e2)const{ return y XLs,YUs,XRs,ans; std::priority_queue pq1; std::priority_queue pq2; for(int i=0;i=x){ break; } pq2.pop(); } while(pq1.empty()==false){ E1 e1=pq1.top(); if(x