#include #include #include #include #include #include #include int main(){ int q; scanf("%d",&q); for(int a0 = 0; a0 < q; a0++){ char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s",s); char *tmp; char *str1="hackerrank"; tmp = s; while(*tmp && *str1) { if(*tmp == *str1) str1++; tmp++; } if(*str1) printf("NO\n"); else printf("YES\n"); // your code goes here } return 0; }