eolymp
bolt
Try our new interface for solving problems
Məsələlər

Incidental Points

Incidental Points

\includegraphics{https://static.e-olymp.com/content/ae/aeb76d2fae0b743418c5a7405be870116c8e1cd8.jpg} \includegraphics{https://static.e-olymp.com/content/12/12540d8feef6ee7d75e8a8ddf92df206ff7cab0d.jpg} \includegraphics{https://static.e-olymp.com/content/12/12540d8feef6ee7d75e8a8ddf92df206ff7cab0d.jpg} \includegraphics{https://static.e-olymp.com/content/12/12540d8feef6ee7d75e8a8ddf92df206ff7cab0d.jpg} \includegraphics{https://static.e-olymp.com/content/12/12540d8feef6ee7d75e8a8ddf92df206ff7cab0d.jpg} Unlike a straight line, a straight segment between two points \textbf{P_1}, \textbf{P_2} (normally written as ) is a line that links the two points but doesn’t extend beyond them. A third point \textbf{P_3} is said to be incident to iff \textbf{P_3} lies on the straight line and between the points P1 and P2. is said to include \textbf{P_3}. By definition, \textbf{P_1} and \textbf{P_2} are included in . Write a program to find the segment that includes the most number of given points. \InputFile Your program will be tested on one or more test cases. Each test case includes a set of two or more unique points, where the Cartesian coordinates of each point is specified on a separate line using two integers \textbf{X} and \textbf{Y} where \textbf{0} ≤ |\textbf{X}|, |\textbf{Y}| < \textbf{1000000}. No test case has more than \textbf{1000} points. An input line made of two or more '\textbf{-}' (minus signs) signals the end of a test case. An extra input line of two or more '\textbf{-}' (minus signs) follow the last test case. \OutputFile For each test case, output the result on a single line using the following format: \textbf{k. n} Where \textbf{k} is the test case number (starting at \textbf{1}), and \textbf{n} is the number of points on the segment.
Zaman məhdudiyyəti 1 saniyə
Yaddaşı istafadə məhdudiyyəti 64 MiB
Giriş verilənləri #1
1 1
1 5
5 9
9 5
5 5
3 2
5 3
----
1 5
5 1
1 1
5 5
----
--
Çıxış verilənləri #1
1. 4
2. 2