#include #include #include #include #include #include #include int main(){ int n; int x; int y; int pointsEarned=0; int hgt; scanf("%d %d %d",&n,&x,&y); int latitude[n]; int longitude[n]; int height[n]; int points[n]; for(int a0 = 0; a0 < n; a0++){ scanf("%d %d %d %d",&latitude[a0],&longitude[a0],&height[a0],&points[a0]); } hgt = 0; for(int i=0;iheight[j]) { int temp = height[i]; height[i] = height[j]; height[j] = temp; temp = latitude[i]; latitude[i] = latitude[j]; latitude[j] = temp; temp = longitude[i]; longitude[i] = longitude[j]; longitude[j] = temp; temp = points[i]; points[i] = points[j]; points[j] = temp; } } } for(int i=0;i