{"problem":{"name":"098. It's More Fun To Compute","description":{"content":"It's More Fun To Compute You are trying to discover that it's more fun to compute, and you're doing so by evaluating long strings of text. You define the _fun-ness_ of a string to be the amount of ch","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF10269098"},"statements":[{"statement_type":"Markdown","content":"It's More Fun To Compute\n\nYou are trying to discover that it's more fun to compute, and you're doing so by evaluating long strings of text. You define the _fun-ness_ of a string to be the amount of characters in the string that are equal to \"f\", \"u\", and \"n\". You can perform cyclic shifts on the string an infinite number of times. When you cyclically shift the string, each character changes into the one after it, so any \"a\" characters become \"b\", \"b\" becomes \"c\", etc. \"z\" characters turn into \"a\" in a cyclic shift.\n\nGiven that you can perform an infinite number of cyclic shifts on the input string, find the maximum _fun-ness_ of the string.\n\nThe only line of input contains a single string $s$, consisting of only lowercase a-z characters and spaces. (When you perform a cyclic shift on the string, nothing happens to the spaces).\n\nOutput a single positive integer $n$: the maximum possible fun-ness of the string, as described above.\n\n## Input\n\nThe only line of input contains a single string $s$, consisting of only lowercase a-z characters and spaces. (When you perform a cyclic shift on the string, nothing happens to the spaces).\n\n## Output\n\nOutput a single positive integer $n$: the maximum possible fun-ness of the string, as described above.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s \\in \\Sigma^* $ be the input string, where $ \\Sigma = \\{a, b, \\dots, z\\} \\cup \\{\\text{space}\\} $.  \nLet $ F = \\{f, u, n\\} $ be the set of \"fun\" characters.  \nLet $ \\sigma^k(s) $ denote the string obtained by applying $ k $ cyclic shifts to $ s $, where each letter $ c \\in \\{a, \\dots, z\\} $ is mapped to $ (c - a + k) \\mod 26 + a $, and spaces remain unchanged.  \n\n**Constraints**  \n- $ s $ contains only lowercase English letters and spaces.  \n- $ k \\in \\mathbb{Z}_{\\geq 0} $, with $ 0 \\leq k < 26 $ (since shifts are modulo 26).  \n\n**Objective**  \nCompute:  \n$$\n\\max_{k=0}^{25} \\left| \\left\\{ i \\mid \\sigma^k(s)_i \\in F \\right\\} \\right|\n$$","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF10269098","tags":[],"sample_group":[],"created_at":"2026-03-03 11:00:39"}}