Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
82334 刘宇轩 31回文字符串II C++ Wrong Answer 1 MS 280 KB 380 2024-07-13 10:47:27

Tests(8/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string a; int i=0,n=0; cin>>a; if(a.size()<=2){ cout<<"No"; return 0; } while(a[i]!='\0'){ i++; n++; } int m=n/2; for(int j=0;j<=m;j++){ if(a[i]==a[i+1]){ cout<<"Yes"; return 0; } if(a[j]!=a[n-j-1]){ cout<<"No"; return 0; } } cout<<"Yes"; return 0; }


Run Info:

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