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

33118번 - ICPC Provincial 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB85745493.103%

문제

The University of INC (UOI) is participating in an ICPC Provincial Contest, a qualifier contest for the ICPC Regional Contest. UOI has 3ドルN$ students (numbered from 1ドル$ to 3ドルN$) who are eager to participate in the contest. There will be $N$ teams, each consisting of exactly 3ドル$ students. Each student can only be assigned to only one team.

As the coach of UOI, you know that student $i$ has a skill rating of $A_i$. You define the strength of a team as the median of the skill ratings of its members.

In order to increase the chance for all UOI teams to qualify for the ICPC Regional Contest, you want to arrange the teams so that the strength of the weakest team is maximized. Determine the maximum strength of the weakest team.

입력

The first line consists of an integer $N$ (1ドル ≤ N ≤ 100,円 000$).

The second line consists of 3ドルN$ integers $A_i$ (0ドル ≤ A_i ≤ 4000$).

출력

Output a single integer representing the maximum strength of the weakest team.

제한

예제 입력 1

2
1500 1700 1800 2300 2500 2600

예제 출력 1

1800

Team 1ドル$ consists of students 1ドル,ドル 3ドル,ドル and 5ドル,ドル while team 2ドル$ consists of students 2ドル,ドル 4ドル,ドル and 6ドル$. The strength of team 1ドル$ and 2ドル$ are 1800ドル$ and 2300ドル,ドル respectively. Other arrangements exist, but none allow the weakest team to have a strength higher than 1800ドル$.

예제 입력 2

1
2800 2100 3000

예제 출력 2

2800

There is only one team with the strength of 2800ドル$.

예제 입력 3

3
4000 0 4000 0 4000 0 4000 0 4000

예제 출력 3

0

힌트

출처

ICPC > Regionals > Asia Pacific > Indonesia > Indonesia National Contest > INC 2024 M번

ICPC > Regionals > Asia Pacific > Indonesia > Jakarta > The 2024 ICPC Asia Jakarta Regional Contest 연습 세션 PA번

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

출처

대학교 대회

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

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