#include #include #include #include #include using namespace std; struct node{ int lati , longi , height , point ; } ; int main() { /* Enter your code here. Read input from STDIN. Print output to STDOUT */ int n ; cin >> n ; int x , y ; cin >> x >> y ; vector< struct node > v(n) ; for( int i=0 ; i>v[i].lati >> v[i].longi >> v[i].height >> v[i].point ;} long long int maxm=-99999999999999 ; for( int i=0 ; i "<hprev and v[j].longi-longprev<=y and v[j].lati-latprev<=x ){ latprev=v[j].lati ; longprev=v[j].longi ; hprev=v[j].height ; netpt+=v[j].point ; //cout<<"("<maxm){ maxm=netpt ; } } } } cout<