int* numberOfLines(int* widths, int widthsSize, char * S, int* returnSize){
int i=0,row=1,total=0,len = strlen(S);
int* arr = (int*)calloc(2,sizeof(int));
for (; i<len; i++)
{
total += widths[S[i] - 'a'];
if (total > 100)
{
row++;
total = widths[S[i] - 'a'];
}
}
arr[0] = row;
arr[1] = total;
*returnSize = 2;
return arr;
}