I am solving http://www.spoj.com/problems/SBANK/ 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.
code: http://ideone.com/x63tZV