文章

26

粉丝

0

获赞

27

访问

3.1k

头像
容易的题 题解:C++
P1667 中南大学机试题
发布于2025年6月25日 14:49
阅读数 84

#include<bits/stdc++.h>
using namespace std;

int main(){
	string s;
	while(cin>>s){
		int a=0,b=0,c=0,d=0;
		for(int i=0;i<s.length();i++){
			if(s[i]=='E'){
				a=1;
			}
			if(a==1){
				if(s[i]=='A'){
					b=1;
				}
				if(b==1){
					if(s[i]=='S'){
						c=1;
					}
					if(c==1){
						if(s[i]=='Y'){
							d=1;
						}
					}
				}
			}
		} 
		if(a==1&&b==1&&c==1&&d==1){
			cout<<"easy"<<endl;
		}else{
			cout<<"difficult"<<endl;
		}
	}
	return 0;
}

 

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发