HARRENHAL what's wrong in the solution?

#include
#include<string.h>
using namespace std;`

char a[10005];

int main()
{
int t,i,len;
bool x;
cin>>t;
while(t–)
{
cin>>a;
len=strlen(a);
x=true;
for(i=0;i<len/2;i++)
{
if(a[i]!=a[len-i-1])
{
x=false;
break;
}
}
if(x)
cout<<“1”<<endl;
else
cout<<“2”<<endl;
}
return 0;
}

len <= 10^5 so make a bigger array

2 Likes
//