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

20214번 - Binary Seating 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 512 MB136988672.269%

문제

By accident, two rooms (room 0ドル$ and room 1ドル$) got booked for the theoretical exam of the B++ Applied Programming Course and both were communicated to the students. Now students might go to either of the rooms, and as a student assistant your job is to supervise room 1ドル$. Since you assisted all these students during the course, you know how much time each student will need to finish the exam. Already before the exam you are eager to go home, but you can only leave when all of the students in your examination room have finished. You assume that every student chooses one of the exam rooms with equal probability, independent of the other students. After how much time do you expect to be able to leave?

입력

The input consists of:

  • A line with an integer $n$ (1ドル \leq n \leq 40$), the number of students.
  • A line with $n$ integers $t_1, \ldots, t_n$ (1ドル \leq t_i \leq 1000$): $t_i$ is the time it takes for the $i$th student to finish the exam and leave.

출력

Output the expected time before you can leave. Your answer should have an absolute or relative error of at most 10ドル^{-6}$.

제한

예제 입력 1

2
2 3

예제 출력 1

2

예제 입력 2

5
1 4 5 2 3

예제 출력 2

4.03125

예제 입력 3

5
2 1 1 1 1

예제 출력 3

1.46875

힌트

출처

ICPC > Regionals > Europe > Northwestern European Regional Contest > Benelux Algorithm Programming Contest > BAPC 2020 Preliminaries B번

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

출처

대학교 대회

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

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