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

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


Капец, я решил правильно до 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/

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

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've been browsing on-line greater than three hours lately, yet I never discovered any interesting article like yours.

It is beautiful worth enough for me. In my view,

if all website owners and bloggers made good content as

you probably did, the internet shall be much more helpful than ever before.

Check out my page แนะนํา หนัง netflix

My coder is trying to persuade me to move to .net from PHP.

I have always disliked the idea because of the expenses.

But he's tryiong none the less. I've been using Movable-type on various websites for about a year and am

concerned about switching to another platform. I have

heard very good things about blogengine.net.

Is there a way I can import all my wordpress posts

into it? Any kind of help would be really appreciated!

Have a look at my webpage - วิเคราะห์บอลวันนี้

Outstanding post however , I was wondering if you could write a litte more on this
subject? I'd be very thankful if you could elaborate a
little bit more. Thank you! http://herreramedical.org/albuterol

Thank you for another informative site. Where else may just I am getting that kind of information written in such an ideal manner?

I've a project that I am simply now operating on, and I have been on the look out

for such information.

my web blog ... https://xn--42c6au3bb9azd9a.live/%e0%b8%84%e0%b8%a5%e0%b8%b4%e0%b8%9b%e0%b8%ab%e0%b8%a5%e0%b8%b8%e0%b8%94%e0%b8%aa%e0%b8%b2%e0%b8%a7%e0%b8%97%e0%b8%b2%e0%b8%87%e0%b8%9a%e0%b9%89%e0%b8%b2%e0%b8%99%e0%b8%8a%e0%b9%88%e0%b8%a7%e0%b8%a2/

This is very fascinating, You're an overly professional blogger.

I have joined your rss feed and stay up for in the hunt for more of your magnificent post.

Additionally, I have shared your web site in my social networks

Also visit my web blog หนัง netflix แนะนํา 2021

Woah! I'm really digging the template/theme of this site.

It's simple, yet effective. A lot of times it's very hard to get that "perfect balance"

between usability and visual appeal. I must say you've done a superb job

with this. In addition, the blog loads extremely quick for me

on Safari. Superb Blog!

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

When someone writes an post he/she retains the plan of a user in his/her mind that how a user can understand it.

Therefore that's why this paragraph is outstdanding.


Check out my blog post - พวงหรีดราคาถูก

Do you mind if I quote a couple of your articles as long as I provide credit and sources back to your blog?

My blog is in the very same area of interest as yours and my

users would definitely benefit from a lot of the information you present here.

Please let me know if this okay with you.


Also visit my website: https://xn--42c6au3bb9azd9a.live/%e0%b8%8a%e0%b8%ad%e0%b8%9a%e0%b8%ab%e0%b8%99%e0%b9%89%e0%b8%b2%e0%b8%99%e0%b9%89%e0%b8%ad%e0%b8%87%e0%b8%84%e0%b8%b4%e0%b8%a1%e0%b8%95%e0%b8%ad%e0%b8%99%e0%b9%82%e0%b8%94%e0%b8%99%e0%b8%81%e0%b8%a3/

Nice post. I was checking continuously this blog and I

am impressed! Extremely useful info specially the last part :

) I care for such information a lot. I was seeking this certain info for a long time.

Thank you and good luck.

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

I love looking through an article that can make men and women think.

Also, many thanks for permitting me to comment!

Feel free to visit my web blog _____________

I feel that is one of the so much significant info for

me. And i'm glad reading your article. However want to statement on some basic issues,

The website style is wonderful, the articles is in point of fact excellent :

D. Just right task, cheers

Feel free to surf to my website - 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/

Having read this I thought it was really informative.

I appreciate you finding the time and energy to put this article

together. I once again find myself personally spending a lot of time both reading

and commenting. But so what, it was still worth it!

Also visit my web-site - https://xn--42c6au3bb9azd9a.live/%e0%b8%ab%e0%b8%99%e0%b8%b8%e0%b9%88%e0%b8%a1%e0%b9%83%e0%b8%ab%e0%b8%8d%e0%b9%88%e0%b9%83%e0%b8%88%e0%b8%94%e0%b8%b5-%e0%b9%81%e0%b8%9a%e0%b9%88%e0%b8%87%e0%b9%80%e0%b8%a1%e0%b8%b5%e0%b8%a2%e0%b9%83/

Hi there! Do you know if they make any plugins to assist with Search Engine Optimization? I'm trying to get my

blog to rank for some targeted keywords but I'm not seeing

very good gains. If you know of any please share. Cheers!

Here is my web blog ... วิเคราะห์บอลวันนี้

Hey there! I could have sworn I've been to this site before but after browsing through

some of the post I realized it's new to me. Anyhow, I'm definitely

delighted I found it and I'll be bookmarking and checking back frequently!

My blog post - ______________________

Howdy! I understand this is somewhat off-topic however I needed to ask.

Does operating a well-established blog such as yours require a lot of work?

I'm completely new to operating a blog however I do write in my journal every day.

I'd like to start a blog so I will be able to share my personal experience and views online.

Please let me know if you have any suggestions

or tips for new aspiring blog owners. Thankyou!

Here is my blog :: _________________

I used to be recommended this blog via my cousin. I'm

no longer sure whether or not this publish is written by way of him

as no one else know such precise approximately my problem.

You're wonderful! Thanks!

Here is my web site: https://xn--42c6au3bb9azd9a.live/thaixxx-%e0%b8%84%e0%b8%a5%e0%b8%b4%e0%b8%9b%e0%b8%ab%e0%b8%a5%e0%b8%b8%e0%b8%94%e0%b8%a7%e0%b8%b1%e0%b8%a2%e0%b8%a3%e0%b8%b8%e0%b9%88%e0%b8%99%e0%b9%80%e0%b9%80%e0%b8%95%e0%b8%81%e0%b9%83%e0%b8%99/

Howdy! This is kind of off topic but I need some guidance from an established blog.

Is it very difficult to set up your own blog? I'm not very

techincal but I can figure things out pretty quick. I'm thinking about creating my own but I'm not sure where to start.

Do you have any ideas or suggestions? Appreciate it

Here is my site ... https://Freefire.bet/slot008-01-08-64/