#include <cstdio> #include <algorithm> using namespace std; const int MAX = 1000 + 10; bool compare(int* a, int* b) { if (a[0] == b[0]) { return a[1] < b[1]; } return a[0] < b[0]; } int main() { int l, m; int **remove = new int*[MAX]; while (scan...