One of the test cases is not working.
Please tell Why it is so.
Don’t improve the code, Just tell about that.
One of the test cases is not working. Please tell Why it is so
After line 30, include an endl.
Also int a[100]={0};
int b[100]={0};
int f[100]={0};
these lines must be withing the while loop for test cases.
Sir but I think then it will gonna make a[100] , b and f for each loop and that will consume very space. So, I thik this one will be more efficient.
Please correct me if I am wrong.
You should reinitialize them for each test…else it may carry the values of previous test case leading to wrong answer.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.