Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
159384 汪明轩 31回文字符串II C++ Runtime Error 1 MS 276 KB 476 2026-08-29 14:00:19

Tests(2/10):


Code:

#include <iostream> #include <cstring> using namespace std; int main() { char s[1005]; cin>>s; int len=strlen(s); bool flag=false; for(int i=0;i<len-1;i++) { if(s[i]==s[i+1]) { flag=true; break; } if(i+2<len&&s[i]==s[i+2]) { flag=true; break; } } if(flag) cout<<"Yes"; else cout<<"No"; return 0; }


Run Info:

*** stack smashing detected ***: ./Main terminated