Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
44639 yuzhengxun 判断字符串是否为回文 C++ 编译错误 0 MS 0 KB 290 2024-03-31 18:04:42

Tests(0/0):


#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; }


测评信息: