why my code does not pass all the test case . i used same code as prateek sir told in video
Random query,codeforce f problem
Hello Dilip, just a small mistake was there, in the loop where you are inputting the nos. there you started the loop from 0 instead of 1.
So just pls make it 1 it will work fine.
for(ll i=0;i<=n;i++){ # what you have done
cin>>a[i];
}
for(ll i=1;i<=n;i++){ # what you need to do
cin>>a[i];
}
I hope it is clear to you. In case it is clear to you pls mark it as resolve and provide the rating as well as feedback so that we can improve ourselves.
In case there is still some confusion pls let me know, I will surely try to help you out.
Thanks
Happy Coding !!
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.