-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaoj1125.cpp
More file actions
61 lines (56 loc) · 1.01 KB
/
aoj1125.cpp
File metadata and controls
61 lines (56 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
#include <iostream>
#include <cstdio>
#include <cstdlib>
#include <string>
#include <vector>
#include <deque>
#include <list>
#include <algorithm>
#include <numeric>
#include <functional>
#include <cmath>
#include <cstring>
#include <cctype>
#include <sstream>
#include <set>
#include <map>
#include <queue>
#include <complex>
using namespace std;
#define REP(i,n) for(int i = 0; i < (int)n; i++)
#define FOR(i,a,b) for(int i = a; i < (int)b; i++)
const int INF = 1<<28;
int main() {
int N;
while(cin >> N, N) {
int W, H;
cin >> W >> H;
bool map[100][100] = { false };
REP(i, N) {
int x, y;
cin >> x >> y;
map[y-1][x-1] = true;
}
int S, T;
cin >> S >> T;
int ans[100][100] = {};
int cnt = 0;
REP(i, H-T+1) {
REP(j, W-S+1) {
FOR(k, i, i+T) {
FOR(l, j, j+S) {
if(map[k][l]) ans[i][j]++;
}
}
cnt = cnt > ans[i][j] ? cnt : ans[i][j];
}
}
// REP(i, H) {
// REP(j, W)
// cout << ans[i][j] << ' ';
// cout << endl;
// }
cout << cnt << endl;
}
return 0;
}