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 1652. Banking Crisis

Question about test case
Posted by Slobodan 11 May 2009 01:56
I am not sure from the problem statement, actually I don't get something. Suppose that we have this test case
5
1 20
1 0
2 0
3 20
3 0
2
1 5 10
3 2 25

Is answer = 2 for this test case?
4 buy debt from 5 to 1 and now 1 have 30 or it still has 20?
If it has 30, then it can buy debt from 2 to 3.

If this is wrong, can tell me what is the solution to this test case, please? Thanks.
Re: Question about test case
Posted by Dorin 12 May 2009 02:19
banks may not use the funds they receive after selling their debts
Re: Question about test case
Posted by Slobodan 12 May 2009 02:38
Thanks. I misread that part.

But, there is still a question:
5
1 100000
1 10
1 0
1 0
2 0
2
1 3 10
5 4 1000

If 2 buy debt from 3 to 1, then it will become responsible and 1 can buy debt from 4 to 5 and become responsible again. Will 1 do that for 2? Is answer here 2 or 1? Thanks.
Re: Question about test case
Posted by Jurca Razvan 13 May 2009 19:40
The answer is 2 for that test.