what is error in my code for the ques of 'chef and typing' of snackdown

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

int main()
{
int i,j,T,N,len,k,p;
float time,temp,ans[100];
char c[100][20];
cin>>T;
for(i=0;i<T;i++)
{
time=0;
cin>>N;
for(j=0;j<N;j++)
{
temp=0.2;
cin>>c[j];
len=strlen(c[j]);
for(k=0;k<len-1;k++)
{
if((int(c[j][k+1])-int(c[j][k])>2)|| (int(c[j][k+1])-int(c[j][k])<-2))
temp+=0.2;
else
temp+=0.4;
}
for(p=0;p<j;p++)
{
if(!strcmp(c[p],c[j])){
temp=temp/2;
break;
}
}
time+=temp;
}
ans[i]=time;
}
for(i=0;i<T;i++)
cout<<(ans[i] * 10)<<endl;
return 0;
}