Square Fishing Net
면접 대비시간 제한1초메모리 제한1024 MB
한 변의 길이가 s인 정사각형을 축에 평행하게 놓아 최대한 많은 물고기 점을 포함할 때 그 개수를 구한다.
문제
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.