Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
92482 刘轻松 31回文字符串II C++ Wrong Answer 1 MS 272 KB 436 2024-10-05 14:35:20

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ string str; 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++){ flag=true; a = i; b = j; while(a!=b){ if(str[a]!=str[b]){ flag=false; break; }else{ a++; b--; } } if(flag==true){ cout<<"Yes"; return 0; } } } cout<<"No"; return 0; }


Run Info:

------Input------
oaksjdhfgvbcnxmzkjndbbdnjk
------Answer-----
Yes
------Your output-----
No