class Solution {
public:
int minDeletionSize(vector<string>& A) {
int l = A.size();
int s = A[0].length();
int count =s;
for(int i=0;i<s;i++)
{
int j;
bool increase=false;
for( j=0;j<l-1;j++)
{
if(A[j][i]<=A[j+1][i])
{
continue;
}
if(A[j][i]>A[j+1][i])
{
break;
}
}
if(j==l-1)count --;
}
return count;
}
};