/** * Get Many Persimmon Trees (PKU 2029) * by Kenji Inoue, 2006-12-25 **/ #include using namespace std; int main() { int n, w, h, s, t; int f[100][100]; // field while (cin >> n, n) { cin >> w >> h; memset(f, 0, sizeof(f)); int x, y; for (int i=0; i> x >> y; f[y][x] = 1; } cin >> s >> t; int max = 0; for (int y=1; y<=h; y++) { for (int x=1; x<=w; x++) { int cnt = 0; for (int y2=0; y2 h) { break; } for (int x2=0; x2 w) { break; } cnt += f[y+y2][x+x2]; if (cnt > max) { max = cnt; } } } } } cout << max << endl; } return 0; }