The forth case is:
Code: Select all
1 5 0
1 0 0 0 0 0
0 1 1 1 2 10
0 0 5 0 0 5
Still the contest data (and the official judge solution) says that it can be done with 13 exchanges.
Moderator: Board moderators
Code: Select all
1 5 0
1 0 0 0 0 0
0 1 1 1 2 10
0 0 5 0 0 5
originally Cynthia has 105 crowns.little joey wrote:If the judge data is the same as the original contest data, I think it is wrong:
The forth case is:This means that before the exchange Alice has 100, Bob has 100 and Cynthia has 25 crowns. Since Alice has to pay Bob 1 crown, and Bob has to pay Cynthia 5 crowns, after the exchange Alice has 99, Bob has 96 and Cynthia has 30 crowns. Since all amounts are below 100 crowns, no one can have the 100 crown note originally owned by Alice, so the answer should be 'impossible'.Code: Select all
1 5 0 1 0 0 0 0 0 0 1 1 1 2 10 0 0 5 0 0 5
Still the contest data (and the official judge solution) says that it can be done with 13 exchanges.