Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
91594 罗迎甲 回文字符串I C++ Accepted 1 MS 276 KB 289 2024-09-22 10:50:33

Tests(10/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { char s[1000]; 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"<<endl; else cout<<"No"<<endl; return 0; }