Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120922 罗子童 31回文字符串II C++ Wrong Answer 1 MS 284 KB 736 2025-06-01 19:04:41

Tests(8/10):


Code:

#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 l,int r){ int s=(r-l+1)/2; for(int i=0;i<s;i++){ if(a[l+1]!=a[r-1]){ return 0; } } return 1; } int main(){ cin>>a; int s=a.size(); for(int i=0;i<s-1;i++){ for(int j=s-1;j>i;j--) if(f(i,j)&&(j-i!=1)){ cout<<"Yes"; return 0; } } cout<<"No"; return 0; }


Run Info:

------Input------
qwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwertyuiopasdfghjklzxcvbnmqwerty
------Answer-----
No
------Your output-----
Yes