标签:
#include<iostream>
#include<string>
#include<algorithm>
#include<cstdio>
using namespace std;
int main(){
string str;
cin>>str;
int sz = str.length();
for(int i = 0 ; i < sz;++i){
if(str[i] == str[i + 1]){
char c = ‘a‘;
while (c == str[i] || (i + 2 < n && c == str[i + 2]))
c++;
str[i + 1]= c;
}
}
cout<<str<<‘\n‘;
return 0;
}
[2016-04-26][codeforces][665C - Simple Strings]
标签:
原文地址:http://www.cnblogs.com/qhy285571052/p/b1617c72dcbba5df306538d12b889521.html