問題一覧 > 通常問題

No.3706 Unbroken Text

レベル : / AI推定難易度 : 92 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 1024 MB / 標準ジャッジ問題
タグ : (解説公開後に AC するまで非表示) / 解いたユーザー数 76
作問者 : UT0911 / テスター : sclara Rino-program 👑 AngrySadEight
お気に入りにしたユーザー ProblemId : 13580 / 自分の提出
問題文最終更新日: 2026-09-09 11:43:21
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
yukicoder contest 513 ゆーてぃーお誕生日コンテスト2026 (順位表) の他の問題:

Problem Statement

Yu-T noticed that U and T from his name are adjacent in alphabetical order.

Prompted by this, he decided to look into whether there are other pairs of adjacent letters.

Being adjacent in alphabetical order means that the $2$ uppercase English letters are consecutive in alphabetical order, regardless of the order in which they are given. A and Z are not adjacent.

Determine whether the uppercase English letters $C_1, C_2$ form a pair of adjacent letters.

Constraints

  • $C_1, C_2$ are uppercase English letters

Input

$C_1\;C_2$

Output

Print Yes if they form a pair of adjacent letters, and No otherwise.

Print a newline at the end.

Sample

Sample 1
Input
U T
Output
Yes

In alphabetical order, U comes right after T, so T and U form a pair of adjacent letters, and you should print Yes.

Sample 2
Input
A I
Output
No

A and I do not form a pair of adjacent letters.

Sample 3
Input
Y Z
Output
Yes

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