Cant understand the solution


#1

I cant understand what is the meaning of this line:
if(ans.size()+1+(A-B.get(idx))/min < maxKick)
I think this should be like if the kick at current index is possible then include but it goes in the opposite manner in the provided solution:-

while(idx<B.size())
{
if(A-B.get(idx)<0)
{
idx++;
continue;
}
if(ans.size()+1+(A-B.get(idx))/min < maxKick)
idx++;
else
{
ans.add(idx);
A=A-B.get(idx);
}
}
Please explain.