#include using namespace std; class list { private: int longitude,latitude,height,points; list *next; public: list() { next = NULL; } void create() { list *start = this; list *node = new list(); int lo,la,h,p; cin >> la >> lo >> h >> p; node->latitude = la; node->longitude = lo; node->height = h; node->points = p; int flag = 0; while(start->next != NULL) { if(node->height <= start->next->height) { list *temp = start->next; start->next = node; node->next = temp; flag = 1; break; } start = start->next; } if(flag == 0) { start->next = node; } } void display() { list *start = this->next; while(start != NULL) { cout << start->latitude << " " << start->longitude << " " << start->height << " " << start->points; cout << endl; start = start->next; } } void count() { int count = 0; list *start = this->next; while(start != NULL) { count = count + start->points; start = start->next; } cout << count; } }; int main() { int n,x,y; list l; cin >> n >> x >> y; for(int i=0;i