Run ID:159173

提交时间:2026-08-26 14:06:57

#include<bits/stdc++.h> using namespace std; string s; bool hw(int x,int y){ int l1=y-x+1; for(int i=0;i<l1/2;i++){ if(s[x+i]!=s[y-i])return false; } return true; } int main(){ cin>>s; int l=s.size(); for(int i=0;i<l-1;i++){ for(int j=l-1;j>i;j--){ if(hw(i,j)&&(j-i!=1)){ cout<<"Yes"; return 0; } } } cout<<"No"; return 0; }