{"problem":{"name":"A. Mike and palindrome","description":{"content":"Mike has a string _s_ consisting of only lowercase English letters. He wants to **change exactly one** character from the string so that the resulting one is a palindrome. A palindrome is a string th","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF798A"},"statements":[{"statement_type":"Markdown","content":"Mike has a string _s_ consisting of only lowercase English letters. He wants to **change exactly one** character from the string so that the resulting one is a palindrome.\n\nA palindrome is a string that reads the same backward as forward, for example strings \"_z_\", \"_aaa_\", \"_aba_\", \"_abccba_\" are palindromes, but strings \"_codeforces_\", \"_reality_\", \"_ab_\" are not.\n\n## Input\n\nThe first and single line contains string _s_ (1 ≤ |_s_| ≤ 15).\n\n## Output\n\nPrint \"_YES_\" (without quotes) if Mike can change **exactly** one character so that the resulting string is palindrome or \"_NO_\" (without quotes) otherwise.\n\n[samples]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"Mike 有一个仅由小写英文字母组成的字符串 #cf_span[s]。他希望将字符串中的*恰好一个*字符进行修改，使得修改后的字符串成为回文串。\n\n回文串是指正读和反读都相同的字符串，例如字符串 \"_z_\"、\"_aaa_\"、\"_aba_\"、\"_abccba_\" 是回文串，但字符串 \"_codeforces_\"、\"_reality_\"、\"_ab_\" 不是。\n\n第一行且仅有一行包含字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 15]）。\n\n如果 Mike 能够通过修改*恰好一个*字符使结果字符串成为回文串，则输出 \"_YES_\"（不含引号）；否则输出 \"_NO_\"（不含引号）。\n\n## Input\n\n第一行且仅有一行包含字符串 #cf_span[s]（#cf_span[1 ≤ |s| ≤ 15]）。\n\n## Output\n\n如果 Mike 能够通过修改*恰好一个*字符使结果字符串成为回文串，则输出 \"_YES_\"（不含引号）；否则输出 \"_NO_\"（不含引号）。\n\n[samples]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ s \\in \\Sigma^* $ be a string of length $ n $, where $ \\Sigma = \\{a, b, \\dots, z\\} $ and $ 1 \\leq n \\leq 15 $.\n\n**Constraints**  \n1. $ |s| = n $, with $ 1 \\leq n \\leq 15 $  \n2. Each character of $ s $ is a lowercase English letter.\n\n**Objective**  \nDetermine whether there exists exactly one index $ i \\in \\{1, \\dots, n\\} $ and a character $ c \\in \\Sigma $ such that replacing $ s[i] $ with $ c $ yields a palindrome, and the resulting string is not identical to $ s $.  \n\nEquivalently, define $ s' $ such that $ s'[j] = s[j] $ for all $ j \\neq i $, and $ s'[i] = c \\neq s[i] $, and $ s' $ is a palindrome.  \nOutput \"YES\" if such $ i $ and $ c $ exist; otherwise, output \"NO\".","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF798A","tags":["brute force","constructive algorithms","strings"],"sample_group":[["abccaa","YES"],["abbcca","NO"],["abcda","YES"]],"created_at":"2026-03-03 11:00:39"}}