ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1795. Husband in a Shop

Please someone tell me what test 9 is!!
Posted by Hakobyan Tigran (RAU) 11 Dec 2010 17:01
I have about 50 wrong submissions,please help me with test #9.



Edited by author 11.12.2010 17:01
Re: Please someone tell me what test 9 is!!
Posted by Ignorance 16 Dec 2010 19:37
With following block :
if (shop.get(current.need) == null) {
  q.removeFirst(); // husband goes home with nothing
}
i had WA9
when I changed it to
if (shop.get(current.need) == null || shop.get(current.need) == 0) {
  q.removeFirst(); // husband goes home with nothing
}
i got AC. May be this helps you.