Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
98323 | 杨登博 | 回文字符串I | C++ | Accepted | 1 MS | 276 KB | 346 | 2024-11-18 20:58:28 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() using namespace std; int main(){ int j=0; char a[1000]; cin>>a; while(a[j]!='\0'){ j++; } for(int i=0;i<j/2;i++){ if(a[i]!=a[j-1-i]){ cout<<"No"; return 0;} } cout<<"Yes"; return 0; }