Sponsors

Tag: problem: (A) Mike and palindrome Solution In C/C++

Codeforces Round #410 (Div....

#include<iostream> using namespace std; main() { string s;cin>>s; int n=s.size(),cnt=0; for(int i=0;i<n/2;i++) { if(s!=s)cnt++; } cout<<(cnt==1||cnt==0&&n%2==1?"YES":"NO")<<endl; }

Advertisement

spot_img