Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120918 刘珩宇 31回文字符串II C++ Wrong Answer 1 MS 280 KB 615 2025-06-01 18:56:29

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


Run Info:

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