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

D. Cutting Cheese

스페셜 저지 — 출력을 사용자 정의 프로그램으로 검사하므로 여러 정답이 인정될 수 있습니다.
Unrated 레이팅 미적용
난이도
3s
시간 제한
1024MB
메모리 제한
0
맞았습니다!!
0
제출 수
0.0%
정답률
레이팅

의견: 0

설명

Of course you have all heard of the International Cheese Processing Company. Their machine for cutting a piece of cheese into slices of exactly the same thickness is a classic. Recently they produced a machine able to cut a spherical cheese (such as Edam) into slices – no, not all of the same thickness, but all of the same weight! But new challenges lie ahead: cutting Swiss cheese. Swiss cheese such as Emmentaler has holes in it, and the holes may have different sizes. A slice with holes contains less cheese and has a lower weight than a slice without holes. So here is the challenge: cut a cheese with holes in it into slices of equal weight. By smart sonar techniques (the same techniques used to scan unborn babies and oil fields), it is possible to locate the holes in the cheese up to micrometer precision. For the present problem you may assume that the holes are perfect spheres. Each uncut block has size \(100 \times 100 \times 100\) where each dimension is measured in millimeters. Your task is to cut it into \(s\) slices of equal weight. The slices will be 100 mm wide and 100 mm high, and your job is to determine the thickness of each slice.

제약
입력 형식

The first line of the input contains two integers \(n\) and \(s\), where \(0 \le n \le 10\,000\) is the number of holes in the cheese, and \(1 \le s \le 100\) is the number of slices to cut. The next \(n\) lines each contain four positive integers \(r\), \(x\), \(y\), and \(z\) that describe a hole, where \(r\) is the radius and \(x\), \(y\), and \(z\) are the coordinates of the center, all in micrometers. The cheese block occupies the points (x, y, z) where \(0 \le x\), y, \(z \le 100\,000\), except for the points that are part of some hole. The cuts are made perpendicular to the \(z\) axis. You may assume that holes do not overlap but may touch, and that the holes are fully contained in the cheese but may touch its boundary.

출력 형식

Display the \(s\) slice thicknesses in millimeters, starting from the end of the cheese with \(z = 0\). Your output should have an absolute or relative error of at most \(10^{−}^{6}\).

예제 1
입력
0 4
출력
25.000000000
25.000000000
25.000000000
25.000000000
예제 2
입력
2 5
10000 10000 20000 20000
40000 40000 50000 60000
출력
14.611103142
16.269801734
24.092457788
27.002992272
18.023645064
문제 정보

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

출처 ICPC World Finals 2015

평가 및 의견

D. Cutting Cheese

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

Log in to rate problems.

개별 의견

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

풀이 제출

D. Cutting Cheese

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