Changed the folder structure of codeforces problemsets
This commit is contained in:
32
codeforces/problemsets/chatroom/a.cpp
Normal file
32
codeforces/problemsets/chatroom/a.cpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(){
|
||||
ios::sync_with_stdio(0);
|
||||
cin.tie(0);
|
||||
|
||||
string s;
|
||||
cin >> s;
|
||||
|
||||
string hello = "olleh";
|
||||
|
||||
for(char& c : s){
|
||||
if(c == hello.back()){
|
||||
hello.pop_back();
|
||||
}
|
||||
if(hello.empty()){
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(hello.empty()){
|
||||
cout << "YES";
|
||||
} else{
|
||||
cout << "NO";
|
||||
}
|
||||
|
||||
cout << flush;
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user