#include #include using std::cin,std::cout,std::sort,std::max; constexpr int MAX_N {(int)2e5+5}; struct City{ int a,b; bool operator<(const City &that)const noexcept{ return this->a class ReadNumber{ char c; T w,n; public: ReadNumber& operator>>(T &num)noexcept{ c=(char)0,w=1,n=0; while(!isdigit(c)){ // if constexpr(!std::is_same_v){ // if(c=='-')w=-1; // } c = getchar(); } while(isdigit(c)){ n = n*10 + (c-'0'); c = getchar(); } num = w*n; return *this; } }; ReadNumber readint; #define cin readint int main(){ cin>>n; for(int i=0;i>city[i].a>>city[i].b; len[i]=1; } sort(city,city+n); for(int i=0;i=0;j--){ if(city[j].b