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 1162. Currency Exchange

how Andrey will increase the capital?
2: (20-1)*1 =19
3:  (19-1)*1=18
****
How can more, than 20?
thank
I understood,...:)

Edited by author 18.02.2017 01:54
IgorKoval(from Pskov) Re: I do not understand an sample. help, please [1] // Problem 1162. Currency Exchange 10 Oct 2012 03:44
I'm too... Please, somebody explane sample.
Why I can only increase money:
1->2  (20-1)*1=19
2->3  (19-1)*1.1=19.8
3->2  (19.8-1)*1.1=20.68
2->1  (20.68-1)*1=19.68
Where I mistake.
Or Nick can just do all day
2->3
3->2
2->3
3->2
........
........
2->3
3->2
and when he will have INF money, he exchange currency from 2 on 1. =)

Edited by author 10.10.2012 03:56
just ignore the words "Let us call some sequence of the exchange operations simple if no exchange point is used more than once in this sequence."
it's sample spfa