RiseOJ는 solved.ac와 제휴 관계가 없습니다. 티어 아이콘 © solved.ac. solved.ac
포럼
ICPC00013

B. Curvy Little Bottles

Unrated 레이팅 미적용
난이도
3s
시간 제한
1024MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

In her bike rides around Warsaw, Jill happened upon a shop that sold interesting glass bottles. She thought it might make an interesting project to use such bottles for measuring liquids, but this would require placing markings on the bottles to indicate various volumes. Where should those volume marks be placed? Jill formalized the problem as follows. Assume a bottle is formed by revolving a shape that is the same as the graph of a polynomial \(P\) between \(x = x_{low}\) and \(x = x_{high}\) around the \(x-ax\)is. Thus the \(x-ax\)is is coincident with a vertical line through the center of the bottle. The bottom of the bottle is formed by a solid circular region at \(x = x_{low}\), and the top of the bottle, at \(x = x_{high}\), is left open. The first sample input represents a bottle formed using the simple polynomial \(4 - 0\).25\(x\), with \(x_{low} = 0\) and \(x_{high} = 12\). The bottom of this bottle is a circle with a radius of 4, and the opening at the top is a circle with a radius of 1. The height of this bottle is 12. Volume markings are in increments of 25. Given a polynomial \(P\), \(x_{low}\), \(x_{high}\), and the volume increment between successive marks on the bottle, compute the distances up from \(x_{low}\) for the marks at successive volume increments. A mark cannot be made past the top of the bottle, and no more than the first 8 increments should be marked. Assume the value of \(P\) is greater than zero everywhere between \(x_{low}\) and \(x_{high}\).

제약
입력 형식

Each test case consists of three lines of bottle data:

  • Line 1: \(n\), the degree of the polynomial (an integer satisfying \(0 \le n \le 10\)).

  • Line 2: \(a\)0, \(a\)1, . . ., \(an\), the real coefficients of the polynomial \(P\) defining the bottle’s shape, where \(a\)0 is the constant term, \(a\)1 is the coefficient of \(x^{1}\), . . ., and \(an\) is the coefficient of \(x^{n}\). For each \(i\), −\(100 \le ai \le 100\), and \(an\)̸ = 0.

  • Line 3: ◦\(x_{low}\) and \(x_{high}\), the real valued boundaries of the bottle (−\(100 \le x_{low} < x_{high} \le 100\) and \(x_{high} - x_{low} > 0\).1). ◦inc, an integer which is the volume increment before each successive mark on the bottle (\(1 \le inc \le 500\)).

출력 형식

For each test case, display the case number and the volume of the full bottle on one line. On a s\(ec- on\)d line, display the increasing sequence of no more than 8 successive distances up from the bottom of the bottle for the volume markings. All volumes and height marks should be accurate to two d\(ec- im\)al places. If the bottle does not have a volume that allows at least one mark, display the phrase insufficient volume. No test case will result in a mark within 0.01 from the top of the bottle. The volume of the bottle will not exceed 1 000. All rounded distances for marks on a bottle differ by at least 0.05.

예제 1
입력
1
4.0 -0.25
0.0 12.0 25
1
4.0 -0.25
0.0 12.0 300
0
1.7841241161782
5.0 10.0 20
0
1.0
0.0 10.0 10
출력
Case 1: 263.89
0.51 1.06 1.66 2.31 3.02 3.83 4.75 5.87
Case 2: 263.89
insufficient volume
Case 3: 50.00
2.00 4.00
Case 4: 31.42
3.18 6.37 9.55
문제 정보

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

출처 ICPC World Finals 2012

평가 및 의견

B. Curvy Little Bottles

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

Log in to rate problems.

개별 의견

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

풀이 제출

B. Curvy Little Bottles

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