포럼
문제 ICPC00199

E. Expeditious Cubing

설명

Your friend Claire has dragged you along to a speedcubing event that is happening in Eindhoven. These events are all about solving the Rubik's cube and similar twisty puzzles as quickly as possible. The attendants of the event can enter into various competitions based on the type and size of the puzzle, and there are even special competitions where the puzzles need to be solved one-handed or blindfolded.

Claire is competing in the most popular competition: speedsolving the \(3\times3\times3\) Rubik's cube, pictured on the right. Each contestant needs to solve the cube five times, each time with a different random scramble. After all solves are completed, the best and the worst times are discarded and the final score is the average of the remaining three times. The contestant with the smallest final score wins.

Claire has done well in the competition so far and is among the contenders for the overall victory. All the other contestants have already finished their five solves, but Claire has one solve remaining. By looking at the final scores of the other contestants, she has deduced her own target final score. As long as her final score is less than or equal to this target score, she will be declared the overall winner. Is it possible for her to win the competition, and if so, what is the worst time she can have on her last solve in order to do so?

제약
입력 형식

The input consists of:
- One line with four real numbers \(t_1\), \(t_2\), \(t_3\) and \(t_4\), the times Claire got on her first four solves.
- One line with a real number \(t\), Claire's target final score, the worst final score she can have in order to be declared the overall winner.

Each number is between \(1\) and \(20\), inclusive, and is given with exactly two decimal places.

출력 형식

If it is not possible for Claire to win the event, output "impossible". If she will win regardless of the time she gets on her last solve, output "infinite". Otherwise, output the worst time she can have on her last solve in order to be declared the overall winner. Output the number to exactly two decimal places.

예제 1
입력
6.38 7.20 6.95 8.11
7.53
출력
infinite
예제 2
입력
6.38 7.20 6.95 8.11
6.99
출력
6.82
예제 3
입력
6.38 7.20 6.95 8.11
6.45
출력
impossible
문제 정보

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

출처 ICPC NWERC 2019

평가 및 의견

E. Expeditious Cubing

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

Log in to rate problems.

개별 의견

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

풀이 제출

E. Expeditious Cubing

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