Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
98316 黄枳润 回文字符串I C++ Wrong Answer 0 MS 272 KB 732 2024-11-18 20:52:59

Tests(0/10):


Code:

#include<iostream> using namespace std; int main(){ /* int s=1,c=1; char a[151],b[151]; cin>>a>>b; for(int i=0;i<151;i++){ if(a[i]!='\0') s++; else break; } for(int i=0;i<151;i++){ if(b[i]!='\0') c++; else break; } if(s==c){ cout<<"yes"; }else{ cout<<"no"; } */ int j=0,c=0,s=0; char a[1001],b[1001]; cin>>a; for(int i=0;i<1000;i++){ if(a[i]!='\0') s++; else break; } for(int i=0;i<s/2;i++){ if(a[i]!=a[s-1-i]){ cout<<"no"; return 0; } } cout<<"yes"; return 0; }


Run Info:

------Input------
ltpffytlohuaoofsqawhbfrvtppczdnumeicqcsvfgjvydqhhuuhhqdyvjgfvscqciemundzcpptvrfbhwaqsfooauholtyffptl
------Answer-----
Yes
------Your output-----
yes