포럼
문제 ICPC00185 ✓ Verified

E. English Restaurant

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
설명

After finding a suitable residence in the Swiss Alps, Robin thought he finally had what it takes to be happy. But every day he woke up feeling that something was missing. Maybe it was the lack of English food in these parts? Spotting a market opportunity and solving his problem at the same time, he teamed up with the famous English chef Jim to open a restaurant nearby. While he has no doubts about Jim's talents as a chef, Robin wants to be sure that opening an English restaurant in the Swiss Alps is a good idea.

Fortunately, as a local, he knows the habits of restaurant customers. At the stroke of each hour, a group of people arrives of size that is uniformly random between \(1\) and \(g\) people (inclusive). The group finds the smallest completely unoccupied table that fits the group and occupies it. If they can not find such a table, the group leaves with great disappointment. Once seated, a group never leaves until the restaurant closes, as Jim has no difficulty keeping the guests entertained.

As an example, suppose the restaurant has \(3\) tables of capacities \(5\), \(8\) and \(9\). If groups of sizes \(5, 10\) and \(3\) arrive (in that order), in the end there will be \(8\) people in the restaurant. The first group occupies the table of capacity \(5\), the second group leaves and the last group occupies the table of capacity \(8\).

Robin plans to keep his restaurant open for \(t\) hours in total. In the restaurant business the most important metric is the expected number of people in the restaurant when it is closes. Can you help Robin calculate the expected occupancy after \(t\) hours?

제약
입력 형식

The input consists of:
- One line with three integers \(n, g, t\) (\(1 \le n \le 100, 1\leq g\leq 200, 1\leq t \leq 100\)), the number of tables in the restaurant, the maximum group size, and the number of hours the restaurant is open.
- One line with \(n\) integers \(c_1, \ldots, c_n\) (\(1 \le c_i \le 200\) for each \(i\)) giving the capacities of the tables.

출력 형식

Output the expected number of people in the restaurant when it closes. Your answer should have an absolute or relative error of at most \(10^{-6}\).

예제 1
입력
3 3 2
1 2 3
출력
3.666666667
예제 2
입력
4 11 4
10 10 10 10
출력
20.000000000
예제 3
입력
4 3 3
4 1 3 2
출력
5.888888888888
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC NWERC 2017

평가 및 의견

E. English Restaurant

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

E. English Restaurant

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8