不愧是我
2023-12-26 21:09:05
发布于:广东
5阅读
0回复
0点赞
#include <bits/stdc++.h>
#define io freopen("in.txt", "r", stdin), freopen("out.txt", "w", stdout)
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
string s;
int leftn, rightn;
bool flag;
void program(){
getline(cin, s);
leftn = 0;
rightn = s.length() - 1;
while(leftn < rightn){
if(s[leftn] != s[rightn]){
flag = false;
cout << "No" << endl;
exit(0);
}
leftn++;
rightn--;
}
flag = true;
cout << "Yes" << endl;
}
int main(){
program();
return 0;
}
这里空空如也
有帮助,赞一个