| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 152675 | 杨登博 | 31回文字符串II | C++ | Accepted | 2 MS | 276 KB | 655 | 2026-04-30 20:04:46 |
#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; int f(int x,int y){ int c=(y-x)/2+1; for(int i=0;i<c;i++){ if(a[i+x]!=a[y-i]){ return 0; } } return 1; } int main(){ cin>>a; int n=a.size(); for(int i=0;i<n-1;i++){ for(int j=i+2;j<n;j++){ if(f(i,j)){ cout<<"Yes";return 0; } } } cout<<"No"; return 0; }