12110 - Gargoyle
Moderator: Board moderators
Re: 12110 - Gargoyle
brianfry713 can you provide any idea about this problem? How the result of the sample input is 60.0?
-
- Guru
- Posts: 5947
- Joined: Thu Sep 01, 2011 9:09 am
- Location: San Jose, CA, USA
Re: 12110 - Gargoyle
0 -> 4, speed = 9, cost = 9 * 5
4 -> 1, speed = 3, cost = 3 * 2
4 -> 2, speed = 3, cost = 3 * 1
4 -> 3, speed = 3, cost = 3 * 2
Total cost = 60
4 -> 1, speed = 3, cost = 3 * 2
4 -> 2, speed = 3, cost = 3 * 1
4 -> 3, speed = 3, cost = 3 * 2
Total cost = 60
Check input and AC output for thousands of problems on uDebug!
Re: 12110 - Gargoyle
Thanks. I missed the "identical" partbrianfry713 wrote:0 -> 4, speed = 9, cost = 9 * 5
4 -> 1, speed = 3, cost = 3 * 2
4 -> 2, speed = 3, cost = 3 * 1
4 -> 3, speed = 3, cost = 3 * 2
Total cost = 60
![:)](./images/smilies/icon_smile.gif)