| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 (추가 시간 없음) | 1024 MB | 126 | 67 | 58 | 52.252% |
With so many activities/events being virtual these days, we are going on a virtual fishing trip!
Given the (x,y) coordinates of n points (each point represents a fish) and a square (representing a fishing net), what is the maximum fish you can catch with one try? You can place the square net anywhere but its sides must be parallel to X-axis and Y-axis. A fish is caught if it is inside or on the boundary of the net.
The first input line contains two integers: s (1 ≤ s ≤ 100), indicating the length of one side of the fishing net and n (1 ≤ n ≤ 100), indicating the number of fish. Each of the next n input lines contains two integers (each between 1 and 100, inclusive) indicating the (x,y) coordinates of one fish. Assume that no two fish are at the same location.
Print the maximum number of fish you can catch.
3 8 2 1 2 3 5 1 5 2 3 2 4 2 10 5 11 5
6
50 2 10 5 11 5
2