#include using namespace std; /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ int main(){ int n; int x; int y; cin >> n >> x >> y; int city[n][4]; int count=0,max=0,i=0,f=0; /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ int latitude; int longitude; int height; int points; for(int a0 = 0; a0 < n; a0++){/*The first line contains three space-separated integers describing the respective values of , , and . Each line of the subsequentHe can choose the number of cities he will visit (if any). He can start the mission from any city. He visits cities in order of s lines contains four space-separated integers denoting the respective , , , and for a city. Constraints*/ /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ cin >> latitude >> longitude >> height >> points; city[a0][0]=latitude; city[a0][1]=longitude; city[a0][2]=height; city[a0][3]=points; } /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ for(int i=0;icity[j][2]){ latitude=city[j][0]; city[j][0]=city[i][0]; city[i][0]=latitude; /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ latitude=city[j][1]; city[j][1]=city[i][1]; city[i][1]=latitude; latitude=city[j][2]; city[j][2]=city[i][2]; city[i][2]=latitude; /*He can start the mission from any city. He visits cities in order of strictly increasing . The absolute difference in between adjacent visited cities in his mission must be at most . The absolute difference in between adjacent visited cities in his mission must be at most . Given , , and the definitions for cities, find and prin*/ latitude=city[j][3]; city[j][3]=city[i][3]; city[i][3]=latitude; } } } for( i=0;i