Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112181 张湘哲 回文字符串I C++ Accepted 1 MS 276 KB 327 2025-03-08 16:32:28

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char s[1001]; int i,n=0,flag=1; cin>>s; while(s[n]!='\0') n++; for(i=0;i<=n/2;i++){ if(s[i]!=s[n-1-i]){ flag=0; break; } } if(flag) cout<<"Yes"; else cout<<"No"; return 0; }