Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
1195 | 林童 | 【字符串】回文串 | C++ | Accepted | 1 MS | 712 KB | 266 | 2020-11-06 20:28:01 |
#include<iostream> #include<cstring> using namespace std; int main(){ string c; int a,i; getline(cin,c); a=c.size(); for(i=0;i<=a;i++){ if(c[i]==c[a-i-1]){ } else{ cout<<"NO"<<endl; return 0; } } cout<<"YES"<<endl; }
------Input------
547
------Answer-----
16
------Your output-----
NO