#abc345a. A - Leftrightarrow
A - Leftrightarrow
Scoring: points
问题陈述
给定一个由 <
、=
和 >
组成的字符串 。
判断 是否是一个 双向箭头 字符串。
一个字符串 是双向箭头字符串当且仅当存在一个正整数 ,使得 是按照这个顺序连接一个 <
、 个 =
和一个 >
,长度为 。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
You are given a string consisting of <
, =
, and >
.
Determine whether is a bidirectional arrow string.
A string is a bidirectional arrow string if and only if there is a positive integer such that is a concatenation of one <
, =
s, and one >
, in this order, with a length of .
Constraints
- is a string of length between and , inclusive, consisting of
<
,=
, and>
.
Input
The input is given from Standard Input in the following format:
Output
If is a bidirectional arrow string, print Yes
; otherwise, print No
.
Sample Input 1
<====>
Sample Output 1
Yes
<====>
is a concatenation of one <
, four =
s, and one >
, in this order, so it is a bidirectional arrow string.
Hence, print Yes
.
Sample Input 2
\==>
Sample Output 2
No
==>
does not meet the condition for a bidirectional arrow string.
Hence, print No
.
Sample Input 3
<>>
Sample Output 3
No
update @ 2024/5/16 17:16:35