#include using namespace std; int main(){ int q; cin >> q; for(int a0 = 0; a0 < q; a0++){ string s; cin >> s; // your code goes here string hackS="hackerrank"; int i,j; vector oneRow(hackS.size(),0); vector> table(s.size(),oneRow); bool canMake=false; for(i=0;i0) table[i][j]=table[i][j-1]; else if(j==0 && i>0) table[i][j] = table[i-1][j]; } else { if ( s[i]==hackS[j]) { table[i][j] = table[i-1][j-1] + 1; //cout<