問題一覧 > 通常問題

No.1381 Simple Geometry 1

レベル : / AI推定難易度 : 725 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-5}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 104
作問者 : 蜜蜂 / テスター : Mitarushi tetanura
お気に入りにしたユーザー ProblemId : 5686 / 自分の提出
問題文最終更新日: 2021-02-08 08:52:08
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
灘高入試コンテスト2021 (順位表) の他の問題:

Problem Statement

In this problem, $\ |AB|\ $ denotes the length of the segment $\ AB\ $ that has points $\ A\ $ and $\ B\ $ as its endpoints and connects these $\ 2\ $ points.

On a two-dimensional plane, there is a rectangle $\ ABCD\ $, with a point $\ P\ $ on side $\ AD\ $ and a point $\ Q\ $ on side $\ CD\ $.
They also satisfy the following.

  • The area of rectangle $\ ABCD\ $ is $\ X\ $
  • Points $\ P\ $ and $\ Q\ $ are not at the same position
  • $|BP|=|BQ|+W$
  • $|AP|=Y$
  • $|CQ|=Z$

Find the area of triangle $\ BPQ\ $.

Input

$X\ \ Y\ \ Z\ \ W$

  • $1 \leq Y \times Z < X \leq 10^6$
  • $1 \leq Y,Z$
  • $0 \leq W \leq 10^6$
  • All inputs are integers
  • There exist a rectangle $\ ABCD,\ $ a point $\ P,\ $ and a point $\ Q\ $ satisfying the conditions

Output

Output the area of triangle $\ BPQ\ $, followed by a newline.
Your answer is considered correct if its relative or absolute error from the expected solution is at most $\ 10^{-5}\ $.

Sample

Sample 1
Input
96 5 6 3
Output
33.0000000000

When rectangle $\ ABCD\ $ satisfies $\ |AB|=12,|AD|=8\ $, we have $\ |BP|=13,|BQ|=10\ $, which satisfies the conditions.

Sample 2
Input
16 2 2 0
Output
6.0000000000

When rectangle $\ ABCD\ $ satisfies $\ |AB|=4,|AD|=4\ $, we have $\ |BP|=2\sqrt{5},|BQ|=2\sqrt{5}\ $, which satisfies the conditions.
Note that $\ |AB|=|AD|\ $ is possible.

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。