I implemented the code for this problem and submitted it and all my test cases passed but when I submitted the same code on SPOJ, I got wrong answer. Why did this happen, can you please explain?
link of code: https://ide.codingblocks.com/s/277380
I implemented the code for this problem and submitted it and all my test cases passed but when I submitted the same code on SPOJ, I got wrong answer. Why did this happen, can you please explain?
link of code: https://ide.codingblocks.com/s/277380
I just found out the mistake, I did not add variable for test cases.
Sorry for the trouble.
Thanks!!