reverse就好了咩

#include <iostream>
#include <cstring>
#include <algorithm>

using namespace std;

int main()
{
    string a, b;
    cin >> a;
    b = a;
    reverse(b.begin(), b.end());
    if (a == b) cout << "yes" << endl;
    else cout << "no" << endl;
    
    return 0;
}

0 条评论

目前还没有评论...

信息

ID
53
时间
1000ms
内存
256MiB
难度
5
标签
递交数
136
已通过
51
上传者