1-50 2.2.1
#include <iostream>
#include <string.h>
#define max 1000
using namespace std;
void match(char *S){
char *t = "EASY";
int i=0,j=0;//i,j分别记录主串,子串的比较位置
while(S[i]!='\0'&&t[j]!='\0'){
if(S[i] == t[j]) i++,j++;
else i++;
}
if(j == 4) cout<<"easy"<<endl; //j==4时,即匹配成功
else cout<<"difficult"<<endl;
return;
}
int main(){
char *S=new char[max];
while(cin>>S){
match(S);
}
return 0;
}