Skip to content

Instantly share code, notes, and snippets.

@ik11235
Created March 7, 2015 14:07
Embed
What would you like to do?
#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[])
{
string s;
cin>>s;
for(int i=0;i<=s.size()/2;i++)
{
if(s[i]!=s[s.size()-1-i]&&s[i]!='*'&&s[s.size()-1-i]!='*')
{
cout<<"NO"<<endl;
return 0;
}
}
cout<<"YES"<<endl;
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment