全WA,求助
查看原帖
全WA,求助
995569
L__B楼主2023/11/12 22:34
#include<bits/stdc++.h>
using namespace std;
int t; char s[17];
int main(){
    scanf("%d",&t);
    while(t--){
        scanf("%s",s); bool f=0;
        for(int i=0;i<strlen(s)-1;i++)
          if(i+4<strlen(s))
            if(s[i]==s[i+1]&&s[i+1]==s[i+2]&&
              s[i+2]==s[i+3]) f=1;
          else
            if(s[i]=='D'&&s[i+1]=='X') f=1;
        printf("%s\n",(f?"YES":"NO"));
    }
    return 0;
}
2023/11/12 22:34
加载中...