#include using namespace std; int main(){ int n; int x; int y; cin >> n >> x >> y; long total=0; int lat,lon,h; for(int a0 = 0; a0 < n; a0++){ int latitude; int longitude; int height; int points; cin >> latitude >> longitude >> height >> points; // your code goes here if(a0==0){ total += points; } else{ if(height>h){ if((abs(lat-latitude)<=x) && (abs(lon-longitude)<=y)){ total +=points; } } } lat = latitude; lon = longitude; h = height; } cout<