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

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


Капец, я решил правильно до 8 пункта. была мысля отправить A назад одного, но чет я думал что лотка перевозит только 2 объекта , посмотрел ответ офигел...посмотрел в условие , понял что упустил слово максимум..капец , просто минус настроение

Не понимаю смысл в действиях 1-6, если в 6 шаге опять на другом берегу остается  С 700,  так же как и после первого шага...

Шаг 0: Лодка слева
Шаг 1: Лодка справа
Шаг 2: Лодка слева
Шаг 3: Лодка справа

Шаг 4: Лодка слева
Шаг 5: Лодка справа
Шаг 6: Лодка слева 

My spouse and I absolutely love your blog and find almost all of your post's to be just what I'm looking for.

Do you offer guest writers to write content for yourself?

I wouldn't mind publishing a post or elaborating on a few of the

subjects you write concerning here. Again, awesome web


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

The other day, while I was at work, my sister stole my apple ipad

and tested to see if it can survive a 25 foot drop, just so she can be

a youtube sensation. My apple ipad is now destroyed

and she has 83 views. I know this is entirely off topic

but I had to share it with someone!

my web blog :: https://xn--42c6bac8Bnke7av4argz1A7nwgub.live/

Its such as you read my mind! You seem to know so much about this, such as

you wrote the e book in it or something. I feel

that you just could do with a few percent to pressure the

message home a bit, however other than that, that is fantastic blog.

A fantastic read. I'll certainly be back.

my web blog - https://xn--42c6bac8Bnke7av4Argz1a7nwgub.live/

Good day! This is my first visit to your blog!

We are a team of volunteers and starting a new initiative

in a community in the same niche. Your blog provided us beneficial information to work

on. You have done a extraordinary job!

My page: https://Xn--42C6Bac8Bnke7Av4Argz1A7Nwgub.live/

I've been browsing online greater than three hours today, yet

I by no means discovered any attention-grabbing article like yours.

It's beautiful value sufficient for me. Personally, if all webmasters

and bloggers made good content as you probably did, the web will likely be much more useful than ever


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

Hi, Neat post. There's a problem with your website in web explorer, could
check this? IE nonetheless is the marketplace chief and a
good component to people will miss your wonderful writing because of this problem. http://herreramedical.org/cialis

Right here is the right blog for anyone who wants to find out

about this topic. You understand so much its almost hard to argue with you (not that I really would want

to…HaHa). You definitely put a fresh spin on a subject which has been discussed for ages.

Wonderful stuff, just excellent!

Feel free to visit my web page: วิเคราะห์บอลวันนี้

Hi would you mind letting me know which hosting company

you're utilizing? I've loaded your blog in 3 completely different web browsers and I must say this blog

loads a lot quicker then most. Can you recommend a good

hosting provider at a reasonable price? Thanks, I appreciate it!

Here is my webpage; __________________

Hey there! Do you know if they make any plugins to help with SEO?

I'm trying to get my blog to rank for some targeted keywords but I'm not seeing very good success.

If you know of any please share. Kudos!

Also visit my website :: https://xn--42c6Bac8bnke7av4argz1a7nwgub.live/

Just wish to say your article is as astounding.

The clarity on your post is simply excellent

and i can assume you are a professional on this subject.

Well with your permission let me to take hold

of your RSS feed to keep updated with forthcoming post.

Thank you a million and please continue the rewarding work.

my page :: หนัง netflix พากย์ไทย

Hi there just wanted to give you a quick heads up.

The text in your content seem to be running off the screen in Firefox.

I'm not sure if this is a formatting issue or something

to do with web browser compatibility but I figured I'd post to let you know.

The layout look great though! Hope you get the issue fixed

soon. Kudos

Check out my homepage - https://Xn--42c6bac8bnke7av4argz1a7nwgub.live/

certainly like your web site but you need to take a look at

the spelling on several of your posts. Many of them are rife with

spelling issues and I find it very troublesome to inform the truth then again I'll surely come

back again.

Feel free to visit my web page ... วิเคราะห์บอลวันนี้

Today, I went to the beach with my kids. I found a sea shell and gave it
to my 4 year old daughter and said "You can hear the ocean if you put this to your ear."
She placed the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear.

She never wants to go back! LoL I know this is totally off topic but I had
to tell someone! http://ciaalis2u.com/

Thanks for sharing your thoughts. I truly appreciate your efforts and I will be waiting for your further write ups thank you once again.

My blog ... หนัง netflix

Having read this I believed it was really informative.

I appreciate you taking the time and energy to put this informative

article together. I once again find myself personally spending a significant

amount of time both reading and commenting. But so what, it was

still worthwhile!

Also visit my web-site วิเคราะห์บอลวันนี้

I do believe all the concepts you have offered on your post.

They're really convincing and can definitely work.

Still, the posts are very quick for novices. May just you please

prolong them a bit from subsequent time? Thanks for the post.

Feel free to visit my webpage :: เครดิตฟรีกดรับเอง

I used to be recommended this website through my cousin. I am no longer sure whether this publish is written by way of him as no one else know

such targeted about my trouble. You are amazing! Thank you!

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

Having read this I believed it was rather enlightening.

I appreciate you taking the time and effort to put this informative article together.

I once again find myself spending way too much time

both reading and posting comments. But so what, it was still worthwhile!

my web site สล็อตเครดิตฟรี