-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathA_Chat_room.cpp
32 lines (32 loc) · 1003 Bytes
/
A_Chat_room.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
//Jai shree ram
#include<bits/stdc++.h>
using namespace std;
int main(){
int count=0;
string s;
cin>>s;
for(int i=0;i<s.size();i++){
if(s[i]=='h'){
for(int j=i+1;j<s.size();j++){
if(s[j]=='e'){
for(int k=j+1;k<s.size();k++){
if(s[k]=='l'){
for(int l=k+1;l<s.size();l++){
if(s[l]=='l'){
for(int m=l+1;m<s.size();m++){
if(s[m]=='o'){
count++;
break;
}
}
}
}
}
}
}
}
}
}
if(count!=0) cout<<"YES"<<"\n";
else cout<<"NO"<<'\n';
}