Wrong Answer

What to do if all testcases work fine but answer is not accepted. And checked the code which is fine.

Lol what?

What do you mean by “all test cases work” ?

There must be some test case for which your problem fails. Your code must be at fault somewhere.

You need to try debugging or coming up with your testcases (conceptual, brute-forced or large, as you feel the need of) and figure out where your code is unable to handle the problem.

If you arent able to come up with anything, are largely frustrated and (assuming it isnt a contest problem and that you didnt understood editorial), you should ask it here. I am sure someone in community would love to help you.

(Or, alternately you can beat the shit out of your pillow out of frustration. As long as it works in improving the mood! :stuck_out_tongue: )

“all testcases work” means the test cases which i find after brute force method

If thats a practice problem, you should then come ask for help. Its only experience by which you will be able to design cases where your code fails. It doesnt come up in 1 day. Some bugs take hours to find. A particular bug took me 2 days of research to trace.

PROBLEM CODE = ZCO13001

To see my code
Click here

We cant access that code :confused:

access denied!

Thanks @vijju123 it got solved when i run code in ideone

1 Like