No.2555 Intriguing Triangle
問題文最終更新日: 2023-12-04 10:40:07
English (AI translation)
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
Advent Calendar Contest 2023
(順位表)
の他の問題:
Problem Statement
You are given positive integers $a,b,c$. Determine whether there exists a *non-degenerate triangle $ABC$ satisfying the following conditions.
- $AB=b,AC=c$.
- By suitably choosing points $D,E$ on side $BC$ with $DE=a$ such that $B,D,E,C$ lie in this order, the lengths of $BD,EC$ are positive integers and $\angle{BAD}=\angle{EAC}$ holds.
*A triangle is non-degenerate if its $3$ vertices are not collinear.
Input
$a$ $b$ $c$
- $1\leq a,b,c\leq100$
- $a\lt b+c$
- All inputs are integers.
Output
Print Yes if triangle $ABC$ exists, and No otherwise.
Print a newline at the end.
Sample
Sample 1
Input
2 2 8
Output
Yes
With $BD=1,EC=6$, triangle $ABC$ does exist, and since $\cos{\angle{BAD}}=\cos{\angle{EAC}}=\dfrac{17}{8\sqrt6}$, the conditions are satisfied. Incidentally, $AD=\dfrac{2\sqrt6}{3},AE=\sqrt6$.
Sample 2
Input
2 3 4
Output
No
No matter how the lengths of $BD,EC$ are chosen, the conditions are not satisfied.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Sigma_Arf