| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 149665 | 黄俊然 | 31回文字符串II | C++ | Accepted | 1 MS | 276 KB | 641 | 2026-03-15 16:03:31 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; string a; bool f(int x,int y){ int c=(y-x)/2+1; for(int i=0;i<c;i++){ if(a[x+i]!=a[y-i]) return 0; } return 1; } int main(){ cin>>a; for(int i=0;i<a.size()-1;i++){ for(int j=a.size()-1;j>i+1;j--){ if(f(i,j)){ cout<<"Yes";return 0; } } } cout<<"No"; return 0; }