Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102219 | 邹昊辰 | 回文字符串I | C++ | Accepted | 1 MS | 284 KB | 343 | 2024-12-21 13:28:40 |
#include<iostream> using namespace std; int main (){ char a[1001]; bool falg=true; int b=0; cin>>a; while(a[b]!='\0'){ b++; } for(int i=0;i<=b/2;i++){ if(a[i]!=a[b-1-i]){ falg=false; } } if(falg){ cout<<"Yes"; } else cout<<"No"; return 0; }