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

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


Комментарии

Have you ever thought about creating an ebook or guest authoring on other blogs?


I have a blog based upon on the same topics you discuss and would love


to have you share some stories/information. I know my audience would enjoy your work.





If you are even remotely interested, feel free to shoot me an e mail.








my website; สล็อต เครดิตฟรี ไม่ต้องฝากก่อน ไม่ต้องแชร์ ยืนยันเบอร์โทรศัพท์

Hi, after reading this remarkable article i am too delighted to share my knowledge here with mates.








Also visit my homepage slotxo

Hi there Dear, are you truly visiting this web page regularly,


if so after that you will definitely get fastidious experience.








my web page: slotxo

Greetings! I've been following your weblog for a long time now and finally got


the courage to go ahead and give you a shout out from


Austin Texas! Just wanted to mention keep up the excellent job!








Also visit my site; slotxo

The next time I read a blog, I hope that it doesnt disappoint me as much as this one. I mean, I know it was my choice to read, but I actually thought you have something interesting to say. All I hear is a bunch of whining about something that you could fix if you werent too busy looking for attention. pokergalaxy

cialis for low price cialis ebay buy generic cialis online overnight

This is my first time go to see at here and i am truly happy to


read everthing at one place.





my web blog :: slotxo

Great info. Lucky me I discovered your website by accident (stumbleupon).


I have saved as a favorite for later!





my web blog; slotxo

Thanks for any other informative blog. The place else could I


am getting that type of information written in such an ideal approach?


I've a venture that I'm simply now working on, and I've been on the look out for such


information.





Also visit my website: slotxo

Thanks for sharing your info. I truly appreciate your efforts and I am


waiting for your next post thank you once again.





Feel free to visit my page ... slotxo

Hello, I desire to subscribe for this blog to get newest updates, thus where can i do it please help.








Feel free to surf to my page :: slotxo

Please let me know if you're looking for a article writer for your weblog.


You have some really great posts and I feel I would be a good asset.


If you ever want to take some of the load off, I'd really like to write some material


for your blog in exchange for a link back to mine. Please send


me an email if interested. Thanks!





Feel free to visit my webpage ... slotxo

Fantastic beat ! I would like to apprentice while you amend your site,


how can i subscribe for a blog web site? The account aided me a acceptable deal.


I had been tiny bit acquainted of this your broadcast provided bright clear concept





My web page: slotxo

I have express a few of the articles on your website now, and I really like your style of blogging. I added it to my favorite’s blog site list and will be checking back soon… bola88

This blog was... how do you say it? Relevant!!


Finally I've found something which helped me. Kudos!








Have a look at my page: online pharmacy

I feel strongly about it and love learning more on this topic. Click here

It's very trouble-free to find out any matter on net as compared to textbooks, as I found


this post at this web site.





Here is my webpage - amoxicillin clavulanate

Pretty insightful post. Never thought that it was this simple after all. Check our site

Excellently designed mailer boxes to be the ideal boxes for giving a decent impression and delivering your products. Get free designing support and free shipping service for awesome custom mailer boxes   all over in the UK!

Путешественник с С перевозит путешественника В, возвращается и берет сумку с 700 монетами и отвозит её путешественнику В, потом возвращается на исходную точку, в лодку садится путешественник А со своей сумкой с 1000 монетами переплывыает на другую сторону и остается там со совей сумкой и сумкой путешественника В, путешественник В забирает сумку путешественника С, потом так же путешественник В забирает путешественника С. Правильно надеюсь 

я бы на месте Путешественника А насыпал в воду усыпительное, взял бы свои монеты (1000), переплыл берег, оставил монеты, вернулся за рюкзаком путешественника B и переплыл обратно. Затем обратно перепрылыл и забрал у последнего. +1000 монет. Stonks

I truly value this superb post that you have accommodated us. I guarantee this would be helpful for a large portion of the general population. life sciences consulting firms

The future can be revealed through the divinatory arts. Man has developed powerful techniques to see through the veil of time. Astrology, numerology and tarot cards: you can discover this on this site of clairvoyance and divination. The clairvoyance gives some of the keys that one must have to succeed in love, in work and in his projects. 
Take charge of your life, you are not alone. In life, you cannot do everything alone because otherwise there would be only hermits who would never speak to each other. So today, you may not be feeling well, you have questions that bother you, doubts, anxieties thinking about what may or may not happen in your future. You have opened your browser to look for a <a href=”https://voyance-telephone-gaia.com”>clairvoyance telephone without cb</a> and you have found us: the Gaia cabinet at your service day and night on 0892 22 20 22.

The future can be revealed through the divinatory arts. Man has developed powerful techniques to see through the veil of time. Astrology, numerology and tarot cards: you can discover this on this site of clairvoyance and divination. The clairvoyance gives some of the keys that one must have to succeed in love, in work and in his projects. 
Take charge of your life, you are not alone. In life, you cannot do everything alone because otherwise there would be only hermits who would never speak to each other. So today, you may not be feeling well, you have questions that bother you, doubts, anxieties thinking about what may or may not happen in your future. You have opened your browser to look for a [url=https://voyance-telephone-gaia.com/]clairvoyance telephone without cb[/url] and you have found us: the Gaia cabinet at your service day and night on 0892 22 20 22.

Страницы