Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
44641 yuzhengxun 判断字符串是否为回文 C++ 通过 0 MS 256 KB 290 2024-03-31 18:08:36

Tests(4/4):


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


测评信息: