포럼
문제 ICPC00166

F. 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 \(n\) points on a piece of paper. The task for the player is to find a straight line, such that at least \(p\) percent of the points lie exactly on that line. Richard and Annabel have very good tools for measurement and drawing. Therefore they can check whether a point lies exactly on a line or not. If the player can find such a line then the player wins. Otherwise the game master wins the game.

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 \(p\) percent of the points, i.e., \(\left\lceil n\cdot p/100 \right\rceil\) points. Now it is up to you to help them and write a program to solve this task.

제약
입력 형식

The input consists of:
- one line with one integer \(n\) (\(1\le n\le 10^5\)), the number of points the game master has drawn;
- one line with one integer \(p\) (\(20\le p \le 100\)), the percentage of points which need to lie on the line;
- \(n\) lines each with two integers \(x\) and \(y\) (\(0\le x,y\le 10^9\)), the coordinates of a point.

No two points will coincide.

출력 형식

Output one line containing either "possible" if it is possible to find a suitable line or "impossible" otherwise.

[Sample input 1: A line with (at least) 3 of the points exists.]

[Sample input 2: No line with at least 3 points exists.]

예제 1
입력
5
55
0 0
10 10
10 0
0 10
3 3
출력
possible
예제 2
입력
5
45
0 0
10 10
10 0
0 10
3 4
출력
impossible
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC NWERC 2014

평가 및 의견

F. Finding Lines

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

F. Finding Lines

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8