Sorting Bank Account, spoj, WA

I am solving and I don’t understand why do I keep getting WA. I have looked for solutions but I see people have solved it using maps. I am solving this problem using C, so using maps is out of question.Also, I don’t think it’ll be fun to solve this using maps. I just want to know the case that I am failing, so that I can correct it and optimize it later, if necessary.

Thank you.


Brother try this one :


Thanks a lot :slight_smile: Anyway, can you spot what was I doing wrong?

Hi dude, I could spot one error (number of zeros)

Please see this link(your code and the test case)
Your solution . It is printing extra zeros. Also, this site could be helpful to you in detecting WA’s–>
Spot Toolkit


Thanks a lot! :slight_smile: