Run ID:92487

提交时间:2024-10-05 14:45:22

#include<bits/stdc++.h> using namespace std; string str; bool isHW(int a,int b){ for(int i=a;i<=(a+b)/2;i++){ if(str[i]!=str[b-a-i]){ return false; } } return true; } int main(){ cin>>str; int a,b; bool flag=true; for(int i=0;i<str.size();i++){ for(int j=i+2;j<str.size();j++){ if(isHW(i,j)==true){ cout<<"Yes"; return 0; } } } cout<<"No"; return 0; }