{"problem":{"name":"\"redocta\".swap(i,i+1)","description":{"content":"You are given a string $S$ that is a permutation of `atcoder`.   On this string $S$, you will perform the following operation $0$ or more times: *   Choose two adjacent characters of $S$ and swap the","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc264_d"},"statements":[{"statement_type":"Markdown","content":"You are given a string $S$ that is a permutation of `atcoder`.  \nOn this string $S$, you will perform the following operation $0$ or more times:\n\n*   Choose two adjacent characters of $S$ and swap them.\n\nFind the minimum number of operations required to make $S$ equal `atcoder`.\n\n## Constraints\n\n*   $S$ is a string that is a permutation of `atcoder`\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$S$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc264_d","tags":[],"sample_group":[["catredo","8\n\nYou can make $S$ equal `atcoder` in $8$ operations as follows:  \n`catredo` $\\rightarrow$ `[ac]tredo` $\\rightarrow$ `actre[od]` $\\rightarrow$ `actr[oe]d` $\\rightarrow$ `actro[de]` $\\rightarrow$ `act[or]de` $\\rightarrow$ `acto[dr]e` $\\rightarrow$ `a[tc]odre` $\\rightarrow$ `atcod[er]`  \nThis is the minimum number of operations achievable."],["atcoder","0\n\nIn this case, the string $S$ is already `atcoder`."],["redocta","21"]],"created_at":"2026-03-03 11:01:14"}}