#include using namespace std; void ContainsHackerRank(const std::string& str) { char letters[10] = {'h','a','c','k','e','r','r','a','n','k'}; int lastElement = 9; int j = 0; for(int i = 0; i < str.size(); ++i) { if(str[i] == letters[j]) { if(j == lastElement){ std::cout << "YES" << std::endl; return; } else j++; } } std::cout << "NO" <> q; for(int a0 = 0; a0 < q; a0++){ string s; cin >> s; // your code goes here ContainsHackerRank(s); } return 0; }