Leftrightarrow

AtCoder
IDabc345_a
Time2000ms
Memory256MB
Difficulty
You are given a string $S$ consisting of `<`, `=`, and `>`. Determine whether $S$ is a **bidirectional arrow** string. A string $S$ is a bidirectional arrow string if and only if there is a positive integer $k$ such that $S$ is a concatenation of one `<`, $k$ `=`s, and one `>`, in this order, with a length of $(k+2)$. ## Constraints * $S$ is a string of length between $3$ and $100$, inclusive, consisting of `<`, `=`, and `>`. ## Input The input is given from Standard Input in the following format: $S$ [samples]
Samples
Input #1
<====>
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`.
Input #2
\==>
Output #2
No

`==>` does not meet the condition for a bidirectional arrow string.  
Hence, print `No`.
Input #3
<>>
Output #3
No
API Response (JSON)
{
  "problem": {
    "name": "Leftrightarrow",
    "description": {
      "content": "You are given a string $S$ consisting of `<`, `=`, and `>`.   Determine whether $S$ is a **bidirectional arrow** string.   A string $S$ is a bidirectional arrow string if and only if there is a positi",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc345_a"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "You are given a string $S$ consisting of `<`, `=`, and `>`.  \nDetermine whether $S$ is a **bidirectional arrow** string.  \nA string $S$ is a bidirectional arrow string if and only if there is a positi...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments