-
Notifications
You must be signed in to change notification settings - Fork 0
/
58A Chat-room.cpp
executable file
·45 lines (41 loc) · 993 Bytes
/
58A 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
33
34
35
36
37
38
39
40
41
42
43
44
45
#include<bits/stdc++.h>
using namespace std;
int main(){
string s;
cin >> s;
int l=s.length();
for(int i=0;i<l;i++)
{
if(s[i]=='h')
{
for(int j=i+1;j<l;j++)
{
if(s[j]=='e')
{
for(int k=j+1;k<l;k++)
{
if(s[k]=='l')
{
for(int m=k+1;m<l;m++)
{
if(s[m]=='l')
{
for(int n=m+1;n<l;n++)
{
if(s[n]=='o')
{
cout << "YES";
return 0;
}
}
}
}
}
}
}
}
}
}
cout << "NO";
return 0;
}