@root 求助!!!!

wc022 CSP-J2二等 2025-07-13 13:56:27 10

#include <bits/stdc++.h> using namespace std; int main() { string a,b; getline (cin,a); b=a; reverse(a.begin(),b.end()); if (b==a) cout<<"yes"; else cout<<"no"; return (0);

} 为什么错了?

{{ vote && vote.total.up }}

共 3 条回复

root 站长

应该是 a.begin(), a.end(),

root 站长
reverse(a.begin(), b.end());
wc022 CSP-J2二等

评测时报了炸弹