Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99267 | hby | 31回文字符串II | C++ | Accepted | 1 MS | 264 KB | 288 | 2024-11-24 18:44:08 |
#include<bits/stdc++.h> using namespace std; char a[10000]; int main(){ gets(a) ; int len=strlen(a); for(int i=0;i<=len;i++){ if(a[i]==a[i+2]&&i+2<len||a[i]==a[i+3]&&a[i+1]==a[i+2]&&i+2<len){ cout<<"Yes"; return 0; } } cout<<"No"; return 0; }