#include #include #include using namespace std; typedef long long LL; struct X{ LL A; LL B; }; bool Comp(X&l,X&r){ if (l.A>N>>K; vector AB(N); LL MaxV=0; LL MinV=10e10; for (i=0;i>AB[i].A>>AB[i].B; if (MinV>AB[i].A){ MinV=AB[i].A; } if (MaxVAB[j].B){ j++; } } return 0; }