Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
97215 | zzx99001 | 回文字符串I | C++ | Accepted | 1 MS | 284 KB | 307 | 2024-11-10 22:22:44 |
#include<iostream> #include<string> using namespace std; int main(){ string ch; cin>>ch; int s=ch.length(); if(s==1)cout<<"No"; else{ for(int i=0;i< s/2;i++) { if(ch[i]!=ch[s-i-1]){cout<<"No"; return 0;} } } cout<<"Yes"; return 0; }