Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
44640 | yuzhengxun | 判断字符串是否为回文 | C++ | Compile Error | 0 MS | 0 KB | 290 | 2024-03-31 18:04:44 |
#include<bits/stdc++.h> using namespace std; string s,s1; int main() { cin>>s; int len=s,size(); for(int i=0;i<=len;i++){ s1[i]=s[len-1-i]; } bool flag=1; for(int i=0;i<len;i++){ if(s1[i]!=s[i]){ cout<<"no"; return 0; } } cout<<"yes"; return 0; }