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

34643번 - Star Guardians 스페셜 저지다국어

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

문제

Jenny and Ojas are part of an elite group of competitive programmers called the Star Guardians. Their next job - to do well in the NAQ!

The Star Guardians are working to assemble a team for the NAQ. They are yet to decide their team, but for each person in the group, it is known how many problems that person will solve.

The Star Guardians are also well-versed in teamwork, so they will solve an additional number of problems based solely on the size of their team.

The Star Guardians want to field a team that maximizes the average number of problems solved per team member. Compute the maximum average they can attain. You may assume the NAQ has infinitely many problems, so the Star Guardians will not run out of problems to solve.

입력

The first line of input contains a single integer, $n$ (1ドル \le n \le 10),ドル the number of Star Guardians.

The next line contains $n$ integers $a$ (0ドル \le a \le 10^9$), with the $i$th integer being the additional number of problems solved if the Star Guardians field a team of size $i$. It is guaranteed that these integers are monotonically increasing.

The next line contains $n$ integers $s$ (0ドル \le s \le 10^8$), which is the number of problems each Star Guardian can solve.

출력

Output a single number, which is the maximum average number of problems per team member attainable. Your output will be considered correct if it has absolute or relative error at most 10ドル^{-6}$ from the correct answer.

제한

예제 입력 1

2
283663485 732616075
0 93763082

예제 출력 1

413189578.5

예제 입력 2

1
17109549
100000000

예제 출력 2

117109549.0

노트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2025 I번

University > MIT > The MIT Programming Contest > 2025-26 > MIT Team Contest 1 I번

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

출처

대학교 대회

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

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