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

16869번 - Pizza Cutting 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB258327.273%

문제

Pizzas are usually cooked as a circle, and are often cut “triangularly” along lines moving out from the center, as shown on the left in Figure D.1 below. However, some heretical people prefer that the pizza be cut into rectangular pieces, as shown on the right in the figure:

Figure D.1: Sample pizza cuts. The pizza on the right corresponds to Sample Inputs 1 and 2.

As you can see, besides the obvious aesthetic issues involved, the pieces that intersect the boundary of the circle may not be complete rectangles. Sometimes these pieces are close to the largest size piece, but other times they are so small as to be useless. Given a pizza radius, lengths and widths of the rectangular cuts, and a “too small” percentage (for example, any slice that is less than 50% of the largest slice is too small), how many slices are cut that will be “too small”?

입력

Input consists of a single line containing six numbers r dx dy x y p, where r (1 ≤ r ≤ 1 000) is the radius of the pizza, dx and dy (1 ≤ dx, dy ≤ 3 000) are the width and height of the pizza cuts, x and y (−10 000 ≤ x, y ≤ 10 000) is the intersection point of one vertical and one horizontal cut, and p (0.0 < p < 1.0) is the percentage defining a “too small” piece. All values are integers except for p, which is a real number with at most 3 decimal places. The pizza is centered at point (0, 0).

출력

Display the number of pieces of pizza that are less than p times the size of the largest piece. A piece with area X is considered p times smaller than another piece with area Y if |X/Y - p |≤ 10−6.

제한

예제 입력 1

100 45 90 0 -20 0.1

예제 출력 1

4

예제 입력 2

100 45 90 0 -20 .999

예제 출력 2

14

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2018 East Central Regional Contest D번

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

출처

대학교 대회

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

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