样例输入:
a+b@b+a#
1+3@3-1#
#include <iostream>
#include<string.h>
#include<string>
#include<algorithm>
using namespace std;
int main()
{
char a[100];
int i = 0;
while (1)
{
cin >> a[i];
i++;
if (a[i-1] == '#')break;//判断字符输完没有
}
for (int j = 0; j < i / 2; j++)
{
if (a[j] != a[i - 2 - j])//判断对应位置的字符是否相等
{
cout << "no!" ;
break;
}
else
{
if (a[j] == '@')//如果到@了就说明比完了,全都是一样的,输出yes!
{
cout << "yes!";
}
}
}
return 0;
}