咽帕蒂

. . . . . 分析 对于一个字符串 如果首尾的字符相同,则删去,答案加1 如果相邻的字符相同,则删去,答案加1 最后,所剩的字符若不为1 则答案加上 所剩字符个数/2-1 . . . . . 程序: #include<iostream> #include<cstdio> #include<cstring> using namespace std; string s; int main() {
相关文章
相关标签/搜索