{"problem":{"name":"141. Majestic Strings","description":{"content":"You define a string to be a _majestic string_ if each successive character in the string comes one character later in the alphabet than the one before it. For example, _bcdef_ is a majestic string, an","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269141"},"statements":[{"statement_type":"Markdown","content":"You define a string to be a _majestic string_ if each successive character in the string comes one character later in the alphabet than the one before it. For example, _bcdef_ is a majestic string, and so is _xyz_, but _acd_ is not a majestic string. The characters also wrap from z to a, so _yzab_ is a majestic string.\n\nGiven a string $s$, figure out whether or not it is a majestic string, using the rule described above.\n\nThe only line of input contains a single string $s$.\n\nIf $s$ is a majestic string, output \"YES\" (no quotes). Otherwise, output \"NO\".\n\n## Input\n\nThe only line of input contains a single string $s$.\n\n## Output\n\nIf $s$ is a majestic string, output \"YES\" (no quotes). Otherwise, output \"NO\".\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s = s_1 s_2 \\dots s_n $ be a string of length $ n \\geq 1 $, where each $ s_i \\in \\{a, b, \\dots, z\\} $.  \nDefine the alphabetical position function $ f: \\{a, b, \\dots, z\\} \\to \\mathbb{Z} $ by $ f(c) = c - 'a' $, so $ f(a) = 0, f(b) = 1, \\dots, f(z) = 25 $.\n\n**Constraints**  \n$ 1 \\leq n \\leq 26 $\n\n**Objective**  \nDetermine whether for all $ i \\in \\{1, 2, \\dots, n-1\\} $:  \n$$\nf(s_{i+1}) \\equiv f(s_i) + 1 \\pmod{26}\n$$  \nIf true, output \"YES\"; otherwise, output \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269141","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}