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

32661번 - Airfare Grants 다국어

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

문제

Congratulations! Your team has advanced to the next round of the International Cupcake Production Competition (ICPC)!

To participate in the competition, you are going to fly to Cupcake City from your hometown. The competition organizers have just shared good news: generous sponsors will support you with your flight ticket!

Here's how it works.

You have already obtained a list of available flights.

Among those options, you first report the price of any one potential flight. This determines the reimbursement limit of your trip; sponsors would pay you up to half that price.

Next, you actually purchase your flight ticket. This flight may or may not be the same as the flight you report for the reimbursement limit.

Finally, you show the receipt of your purchase, and sponsors will reimburse you the minimum of your actual cost and the reimbursement limit.

Now, you want to figure out your minimum possible net cost---the price you pay, minus the amount you get reimbursed.

Naturally, you will report the price of the most expensive flight ticket and buy the cheapest flight ticket.

입력

The first line of input is an integer, $N$ (1ドル \leq N \leq 50$), the number of available flights.

Each of the next $N$ lines contains an integer $P$ (10ドル \leq P \leq 10^5$), which is the price of a flight ticket from your hometown to Cupcake City, in dollars. It is guaranteed that $P$ is a multiple of 10ドル$.

출력

Output a single integer, the minimum amount, in dollars, that you have to pay for a flight ticket, excluding the amount of travel support from sponsors.

제한

예제 입력 1

2
150
250

예제 출력 1

25

예제 입력 2

5
200
300
150
400
500

예제 출력 2

0

힌트

출처

ICPC > Regionals > North America > Rocky Mountain Regional > 2024 Rocky Mountain Regional Contest A번

ICPC > Regionals > North America > Mid-Central Regional > 2024 Mid-Central USA Programming Contest A번

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

출처

대학교 대회

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

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