恐怖题解
2024-09-01 15:36:40
发布于:江苏
4阅读
0回复
0点赞
#include<bits/stdc++.h>
#define ll long long                                                          //防伪标识
#define MAXN 1005
#define maxn 10005
#define MAXM 10000
#define maxm 1000005
using namespace std;
int t;
int n;
bool x = 0;
const string b = "meow";
int c = 0;
int main(){
	cin>>t;
//	cout<<b[c]<<endl;
    
	while(t--){
        
		string a;
        c = 0;
		cin>>n;
		cin>>a;
		x = 0;
		for(int i = 0;i<a.size();i++){
			if(a[i]!=b[c]&&a[i]!=b[c]-'a'+'A'){
				if(a[i]!=b[c+1]&&a[i] != b[c+1]-'a'+'A'){
					x = 1;
					break;
				}
				else
					c++;
			}	
		} 
		if(!x)
        	cout<<"YES"<<endl;
	}
	return 0;
}
这里空空如也







有帮助,赞一个