#include #include #include #include #include #include #include int main(){ int q,i,count; scanf("%d",&q); for(int a0 = 0; a0 < q; a0++){ char* s = (char *)malloc(512000 * sizeof(char)); scanf("%s",s); count=1; // your code goes here for(i=0;i