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

Трём путешественникам нужно пересечь реку. У каждого из них определенное количество золотых монет в рюкзаке.
Путешественник А имеет 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 оценки)


Nice post. I used to be checking continuously this weblog and I'm

inspired! Extremely helpful info specially the closing section :) I handle such

info a lot. I was seeking this certain info for a long time.

Thank you and best of luck.

Also visit my web site ... 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/

Does your website have a contact page? I'm having a tough time locating it but, I'd like

to send you an email. I've got some recommendations for your blog you might be interested in hearing.

Either way, great website and I look forward to seeing it grow over time.

Here is my homepage - เว็บคาสิโน แจกเครดิตฟรี

I truly love your site.. Great colors & theme. Did you make this site yourself?

Please reply back as I'm planning to create my own blog and want to learn where you got this

from or just what the theme is called. Appreciate it!

Feel free to surf to my blog post - วิเคราะห์บอลวันนี้

Hey I know this is off topic but I was wondering if

you knew of any widgets I could add to my blog that automatically tweet my newest twitter updates.

I've been looking for a plug-in like this

for quite some time and was hoping maybe you would have some experience with

something like this. Please let me know if you run into anything.

I truly enjoy reading your blog and I look forward to your new updates.

my homepage :: วิเคราะห์บอลวันนี้

Someone necessarily assist to make significantly articles I would state.

That is the very first time I frequented your website page and so

far? I surprised with the research you made to make this actual put up amazing.

Excellent process!

Also visit my webpage ... เครดิตฟรี กดรับเอง

An outstanding share! I have just forwarded this onto a friend who had been doing a little homework on this.

And he in fact bought me dinner simply because

I stumbled upon it for him... lol. So let me reword this....

Thanks for the meal!! But yeah, thanx for spending the time to talk about this matter here on your website.

Here is my web-site :: เครดิตฟรีกดรับเอง

My spouse and I stumbled over here from a different web page and thought I
should check things out. I like what I see so now i'm following you.
Look forward to checking out your web page repeatedly. https://hydroxychloroquinee.com/

This is the right blog for anybody who would like to find out about this topic.

You know so much its almost hard to argue

with you (not that I actually would want to…HaHa). You certainly put a new

spin on a subject that's been written about for

ages. Excellent stuff, just great!

Feel free to visit my web page - เซ็กซี่บาคาร่า

Hi there very cool website!! Guy .. Excellent .. Superb ..
I'll bookmark your website and take the feeds also?
I'm happy to find so many helpful information right here within the put
up, we want develop extra strategies in this regard, thanks for sharing.

. . . . . http://www.deinformedvoters.org/hydroxychloroquine