Logo
(追記) (追記ここまで)

30308번 - Determining Duos 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 (추가 시간 없음) 1024 MB71332650.980%

문제

As a coach of 2ドルn$ students, you are making $n$ duos (teams of two) for the upcoming programming contest season. After the duos have been created, they will participate in $r$ contests, each about a different topic: DP, graphs, geometry, etc. You already ran a set of internal selection contests to rank the students, and from this you were able to rank all the students with a unique integer score between 1ドル$ and 2ドルn$ inclusive for each topic, with 2ドルn$ being the best.

When a duo participates in a contest on a given topic, their score will be the maximum of the two scores of the two students for this topic.

You think it would be amazing if summed up over all duos and contests, your students could achieve a total score of at least $\frac 12 rn(3n+1)$. Is this possible?

입력

The input consists of:

  • One line with two integers \(n\) and \(r\) (\(1 \leq n \leq 4000\), \(1 \leq r \leq 100\)), the number of duos and the number of topics.
  • \(r\) lines, the \(i\)th of which contains \(2n\) integers \(x_{i,1}, \ldots, x_{i,2n}\) (\(1 \leq x_{i,j} \leq 2n\) for each \(i, j\)) where \(x_{i,j}\) is the score of student \(j\) on topic \(i\).

출력

If it is possible to make duos such that the total score over all duos and contests is at least $\frac 12 rn(3n+1),ドル output "possible". Otherwise, output "impossible".

제한

예제 입력 1

2 2
1 2 3 4
1 2 3 4

예제 출력 1

possible

예제 입력 2

2 2
1 2 3 4
4 1 2 3

예제 출력 2

possible

예제 입력 3

2 3
1 2 3 4
4 1 2 3
1 3 2 4

예제 출력 3

impossible

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2023 Preliminaries D번

  • 문제를 만든 사람: Pim Spelier
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /