#include using namespace std; /*class cage { public: int latitude; int longitude; int height; int points; }*/ int main(){ int n; int x; int y; int la,lo,h,p; int sum=0; cin >> n >> x >> y; //cage a[10]; for(int i = 0; i < n; i++){ int latitude; int longitude; int height; int points; cin >> latitude >> longitude >> height >> points; // your code goes here if(i==0) sum=sum+points; else { if(height>h && abs(la-latitude)<=x && abs(lo-longitude)<=y) sum=sum+points; } la=latitude; lo=longitude; h=height; //p=points; /*if(i==0) sum=sum+p;*/ } cout<