Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
109268 | 陈铎文 | 回文字符串I | C++ | Accepted | 1 MS | 280 KB | 296 | 2025-02-08 08:47:25 |
#include<bits/stdc++.h> using namespace std; int main(){ char ch[1001]; bool t=true; int n=0; cin>>ch; while(ch[n]!='\0'){ n++; } for(int i=0;i<=n/2;i++){ if(ch[i]!=ch[n-1-i]){ t=false; break; } } if(t==true){ cout<<"Yes"; } else{ cout<<"No"; } }