Problem B
Finding Lines
Annabel and Richard like to invent new games and play
against each other. One day Annabel has a new game for Richard.
In this game there is a game master and a player. The game
master draws
There is just one problem. The game master can draw the
points in a way such that it is not possible at all to draw a
suitable line. They need an independent mechanism to check
whether there even exists a line containing at least
Input
The input consists of:
-
one line with one integer
( ), the number of points the game master has drawn; -
one line with one integer
( ), the percentage of points which need to lie on the line; -
lines each with two integers and ( ), the coordinates of a point.
No two points will coincide.
Output
Output one line containing either “possible” if it is possible to find a suitable line or “impossible” otherwise.
![]() |
(a) Sample input 1: A line with (at least) 3 of the points exists. |
![]() |
(b) Sample input 2: No line with at least 3 points exists. |
Sample Input 1 | Sample Output 1 |
---|---|
5 55 0 0 10 10 10 0 0 10 3 3 |
possible |
Sample Input 2 | Sample Output 2 |
---|---|
5 45 0 0 10 10 10 0 0 10 3 4 |
impossible |