Last active
January 16, 2023 05:55
-
-
Save lazycipher/3efeb9a58f875f27176e8932c3982df3 to your computer and use it in GitHub Desktop.
CodeForces 58A - Chat room Solution in C++
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include<iostream> | |
| int main(){ | |
| std::string word, hello="hello"; | |
| std::cin>>word; | |
| int j=0, pas=0; | |
| for(int i=0; i<word.length();i++){ | |
| if(word[i]==hello[j]){ | |
| j++; | |
| pas++; | |
| } | |
| } | |
| if(pas==5){ | |
| std::cout<<"YES"; | |
| }else{ | |
| std::cout<<"NO"; | |
| } | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment