https://www.codechef.com/viewsolution/26211118
what is wrong with my solution
See my answer in this thread, and probably @anon55659401’s as well
Edit:
Actually, you seem to pass his testcase, though you’re failing my one
bro how can you type 10^5 for 10^5 times because if you give input size 10^5 you will have to give 10^5 values
Do you have access to a “computer”? They can help to automate repetitive work like this
bro isnt there any small input for which my code fails?
https://www.codechef.com/viewsolution/26201277
can somebody tell the fault in my logic as it seems correct to me (code is self explanatory)
I’ve already given you a failing testcase! I can’t find any “small” ones which yours fail.
No, I haven’t looked at it yet.