103331: [Atcoder]ABC333 B - Pentagon
Description
Score : $200$ points
Problem Statement
A regular pentagon $P$ is shown in the figure below.
Determine whether the length of the line segment connecting points $S_1$ and $S_2$ of $P$ equals the length of the line segment connecting points $T_1$ and $T_2$.
Constraints
- Each of $S_1$, $S_2$, $T_1$, and $T_2$ is one of the characters
A
,B
,C
,D
, andE
. - $S_1 \neq S_2$
- $T_1 \neq T_2$
Input
The input is given from Standard Input in the following format:
$S_1S_2$ $T_1T_2$
Output
If the length of the line segment connecting points $S_1$ and $S_2$ of $P$ equals the length of the line segment connecting points $T_1$ and $T_2$, print Yes
; otherwise, print No
.
Sample Input 1
AC EC
Sample Output 1
Yes
The length of the line segment connecting point A
and point C
of $P$ equals the length of the line segment connecting point E
and point C
.
Sample Input 2
DA EA
Sample Output 2
No
The length of the line segment connecting point D
and point A
of $P$ does not equal the length of the line segment connecting point E
and point A
.
Sample Input 3
BD BD
Sample Output 3
Yes
Output
得分:$200$分
问题描述
如图所示,正五边形$P$。
判断$P$中连接点$S_1$和$S_2$的线段长度是否等于连接点$T_1$和$T_2$的线段长度。
约束条件
- 每个$S_1$、$S_2$、$T_1$和$T_2$是字符
A
、B
、C
、D
和E
中的一个。 - $S_1 \neq S_2$
- $T_1 \neq T_2$
输入
输入从标准输入按以下格式给出:
$S_1S_2$ $T_1T_2$
输出
如果$P$中连接点$S_1$和$S_2$的线段长度等于连接点$T_1$和$T_2$的线段长度,打印Yes
;否则,打印No
。
样例输入1
AC EC
样例输出1
Yes
$P$中连接点A
和点C
的线段长度等于连接点E
和点C
的线段长度。
样例输入2
DA EA
样例输出2
No
$P$中连接点D
和点A
的线段长度不等于连接点E
和点A
的线段长度。
样例输入3
BD BD
样例输出3
Yes