시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB3010932.143%

문제

John, a student who is taking the game development course, recently developed a mobile game called Fruit Slicer for his coursework. In the game the player slices fruits that are throw into the air by swiping the touch screen. However the game is quite simple because John was not able to write code for the geometry required for a more complex version. In the game each slice is a straight line of infinite length, and all fruits have the same shape of a circle with unit radius. The figure shows a cool snapshot of John’s game.

John introduces his game to his best friend Sean, who soon gets bored of playing the simple game. But as a teaching assistant of the algorithm course, Sean decides to turn the game into a homework assignment. He asks the students in the algorithms course to write a program that can compute the best slice at any given moment of the game. Given the locations of the fruits, the program should determine the maximum number of fruits that can be sliced with a single straight-line swipe.

As a student in Sean’s class, you are now the one who is facing this challenge.

입력

The first line has a single integer n (1 ≤ n ≤ 100). The next n lines each have two real numbers giving the x and y coordinates of a fruit. All coordinates have an absolute value no larger than 104 and are given with exactly two digits after the decimal point. Fruits may overlap.

출력

Output the maximum number of fruits that can be sliced with one straight-line swipe. A swipe slices a fruit if the line intersects the inner part or the boundary of the fruit.

예제 입력 1

5
1.00 5.00
3.00 3.00
4.00 2.00
6.00 4.50
7.00 1.00

예제 출력 1

4

예제 입력 2

3
-1.50 -1.00
1.50 -1.00
0.00 1.00

예제 출력 2

3

예제 입력 3

2
1.00 1.00
1.00 1.00

예제 출력 3

2

출처

ICPC > Regionals > North America > North America Qualification Contest > ACM-ICPC North America Qualifier 2018 E번

  • 문제를 만든 사람: Bowen Yu