You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
699 B

#include <bits/stdc++.h>
using namespace std;
int main() {
//输入+输出重定向
//freopen("../x.in", "r", stdin);
//freopen("../x.out", "w", stdout);
string s;
cin >> s;
stack<int> Stack;
for (int i = 0; i < s.size() / 2; ++i) {
Stack.push(s[i]);
}
bool isHuiWen = true;
for (int i = s.size() / 2 + 1; i < s.size(); ++i) {
char c = Stack.top();
Stack.pop();
if (s[i] != c) {
isHuiWen = false;
break;
}
}
if (isHuiWen)cout << "yes" << endl;
else cout << "no" << endl;
//关闭文件
//fclose(stdin);
//fclose(stdout);
return 0;
}