Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
99051 | 杨一诺 | 31回文字符串II | C++ | Wrong Answer | 49 MS | 272 KB | 400 | 2024-11-24 10:39:02 |
#include<bits/stdc++.h> using namespace std; string a; int al=0,d; int aw,bw; int main() { cin>>a; al=a.size(); for(int i=0;i<al;i++){ for(int j=0;j<al;j++){ if(a[i]==a[j]&&i!=j){ string c=a.substr(i,j-i); for(int i=0;i<al;i++){ if(c[i]==c[i+2]){ d=1; } } } } } if(d==1){ cout<<"Yes"; } else{ cout<<"No"; } return 0; }
------Input------
aa
------Answer-----
No
------Your output-----
Yes