Переправа через реку

Трём путешественникам нужно пересечь реку. У каждого из них определенное количество золотых монет в рюкзаке.
Путешественник А имеет 1000 монет
Путешественник B имеет 700 монет
Путешественник C имеет 300 монет

Для пересечения реки есть лодка, которая может вместить максимум 2 объекта - двух путешественников или путешественника с рюкзаком. Проблема заключается в том, что если оставить любого путешественника с количеством золота, превышающим его собственное - он сбежит, прихватив все деньги. То же касается и двух путешественников, если они останутся с золотом, превышающим их суммарные запасы - они убегут с золотом.
Какая стратегия позволит всем пересечь реку и остаться при деньгах?


0. (1000)(700)(300) A B C ---- 
1. (1000)(300) A C ---- (700) B
2. (1000)(300) A B C ---- (700)
3. (1000) B C ---- (700) (300) A
4. (1000) A B C ---- (700) (300)
5. (1000) A  ---- (700) (300) B C
6. (1000) (300) A C ---- (700) B
7. (300) C ---- (700) (1000) A B
8. (700) (300) B C ---- (1000) A
9. (700) (300) ---- (1000) A B C
10. (700) (300) A ---- (1000) B C
11. (700) ---- (300) (1000) A B C
12. (700) B ---- (300) (1000) A C
13. ---- (300) (1000) (700) A B C
Ваша оценка: Нет Средняя: 3.2 (1148 оценки)


It's a shame you don't have a donate button! I'd definitely donate to this brilliant blog!
I suppose for now i'll settle for book-marking and adding your RSS feed to my
Google account. I look forward to fresh updates and will share this website with my Facebook group.
Talk soon! https://herreramedical.org/hydroxychloroquine

Excellent pieces. Keep posting such kind of information on your blog.

Im really impressed by your blog.

Hello there, You have done an incredible job.

I'll certainly digg it and for my part recommend to my friends.

I am confident they will be benefited from this web site.

Take a look at my homepage เซ็กซี่บาคาร่า

Write more, thats all I have to say. Literally, it seems as though you relied on the video to

make your point. You clearly know what youre talking about,

why throw away your intelligence on just posting videos to your

weblog when you could be giving us something informative to read?

Review my site ... วิเคราะห์บอลวันนี้

I know this if off topic but I'm looking into starting my own blog and was curious

what all is needed to get setup? I'm assuming having a blog

like yours would cost a pretty penny? I'm not very web smart so I'm not 100% certain. Any suggestions or advice would

be greatly appreciated. Cheers

Here is my page; https://Freefire.bet/%E0%B9%80%E0%B8%84%E0%B8%A3%E0%B8%94%E0%B8%B4%E0%B8%95%E0%B8%9F%E0%B8%A3%E0%B8%B5-%E0%B8%81%E0%B8%94%E0%B8%A3%E0%B8%B1%E0%B8%9A%E0%B9%80%E0%B8%AD%E0%B8%87-03-08-21/

Wonderful items from you, man. I've be aware your stuff previous to and you are just too great.

I actually like what you've got right here, really like what you are saying and the

best way through which you are saying it. You

are making it enjoyable and you still take care of to stay it smart.

I can't wait to read far more from you. This is really a terrific

web site.

my web blog :: https://Xn--42C6Bac8Bnke7Av4Argz1A7Nwgub.live