question : CodeChef: Practical coding for everyone
c++ solution : CodeChef: Practical coding for everyone
c solution : CodeChef: Practical coding for everyone
plz help me to find out where is the problem in c code and also give any suggestion for optimising this,
according to constraint -
t <= 10^5 and
n <= 10^5
if we have O(n) solution then it might cross 10^8 operation in 1 sec
In second last else if you are not printing in next line
else if(countA < countB)
{
if(countA + remShotA < countB)
{
printf("%d", i + 1);
break;
}
}
2 Likes