포럼
문제 ICPC00208

F. Faster Than Light

설명

Faster Than Light (FTL) is a space-based top-down strategy game by Subset Games. You control a ship which belongs to the Galactic Federation and have to fight a ship of the Rebel Faction. The enemies' spaceship is represented by a set of axis-aligned non-intersecting rectangles in the plane which correspond to the rooms of the ship. Your ship is close to destruction, but your weapon, the hull beam, is ready to fire.

The hull beam shoots an infinite beam in a direction of your choice that deals one damage to each room it intersects. Coincidentally, the enemies' ship consists of \(n\) rooms and has exactly \(n\) health points. Thus, you need to hit every room to destroy the enemy before they destroy you. Now you quickly need to check if it is possible to position the beam in such a way. Note that the beam deals damage even when it only touches the boundary of a room. See Figure for an example.

제약
입력 형식

The input consists of:
- One line with an integer \(n\) \((1\leq n \leq 2\cdot10^5)\), the number of rooms.
- \(n\) lines, each with four integers \(x_1\), \(y_1\), \(x_2\), and \(y_2\) (\({0\leq x_1 and \({0\leq y_1), describing the coordinates of two opposite corners (\(x_1\),\(y_1\)) and (\(x_2\),\(y_2\)) of a room.

It is guaranteed that no two rooms have a common interior point.

출력 형식

If it is possible for the hull beam to pass through all rooms at once, output "possible". Otherwise, output "impossible".

예제 1
입력
5
1 3 3 4
2 2 4 3
4 1 5 3
5 2 7 3
6 3 8 4
출력
possible
예제 2
입력
4
1 1 2 2
1 3 2 4
3 1 4 2
3 3 4 4
출력
impossible
예제 3
입력
3
1 1 2 2
1 3 2 4
3 3 4 4
출력
possible
문제 정보

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

출처 ICPC NWERC 2022

평가 및 의견

F. Faster Than Light

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

Log in to rate problems.

개별 의견

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

풀이 제출

F. Faster Than Light

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