1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 `#include #define booost ios_base::sync_with_stdio(false); cin.tie(nullptr); #define fi first #define se second #define bp __builtin_popcount using namespace std; typedef long long LL; typedef long double LD; typedef pair < int, int > PII; typedef pair < PII, int > PIII; typedef pair < LL, LL > PLL; typedef pair < LD, LD > PDD; const LL MOD=1e9+7; const LL LLINF=1e18+7; const int C=500009; vector evX,evY; bitset bx,by; unordered_map,LL> MPX,MPY; int main() { //booost; //freopen("C:/Users/kucha/Documents/ISIM 5. semestr/PA/tertests/B1100.in","r",stdin); int X,Y,n,x1,x2,y1,y2; scanf("%d %d %d",&n,&X,&Y); //cin>>n>>X>>Y; for(int i=0;i>x1>>y1>>x2>>y2; if(x1>x2) { swap(x1,x2); } if(y1>y2) { swap(y1,y2); } evX.push_back({x1,i+1}); evY.push_back({y1,i+1}); evX.push_back({x2,i+1}); evY.push_back({y2,i+1}); } evX.push_back({0,0}); evX.push_back({X,0}); evY.push_back({0,0}); evY.push_back({Y,0}); sort(evX.begin(),evX.end()); sort(evY.begin(),evY.end()); LL xmax=0,ymax=0; for(int i=0;i+1