A671.回文字符串 题解
2026-08-14 17:12:46
发布于:浙江
8阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
int main(){
string a,b;
cin>>a;//如果输入为ahhs
b = a;
reverse(b.begin(),b.end());//那么b = shha
if(a==b) cout<<"Yes";//相等
else cout<<"No";//不等
return 0;
}
全部评论 1
1
5天前 来自 浙江
0









有帮助,赞一个