Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104237 | 谢绍澜 | 31回文字符串 | C++ | Accepted | 1 MS | 276 KB | 564 | 2025-01-04 16:46:26 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<stack> #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ char a[1000]; cin>>a; stack<char>b; int n=strlen(a); for(int i=0;i<n;i++){ b.push(a[i]); } for(int i=0;i<n;i++){ if(b.top()!=a[i]){ cout<<"No"; return 0; } b.pop(); } cout<<"Yes" ; }