#26753: C++簡單reverse解法


andyli0123 (培哥)


#include <iostream>
#include <algorithm>
using namespace std;

int main(){
ios::sync_with_stdio(0), cin.tie(0);
string s;
cin >> s;
string s2 = s;
reverse(s.begin(), s.end());
if(s == s2) cout << "yes\n";
else cout << "no\n";
}