Вопрос задан 08.09.2018 в 17:16. Предмет Информатика. Спрашивает Шмелёва Анастасия.

На березі річки стояли двоє дорослих.Їм потрібно переправитися на протилежний берег. Поблизу в

маленькому човні плавають два хлопчики.Човен може витримати вагу або двох хлопчиків або одного дорослого. Склади алгоритм перевезення людей на протилежний берег.
0 0
Перейти к ответам

Ответы на вопрос

Внимание! Ответы на вопросы дают живые люди. Они могут содержать ошибочную информацию, заблуждения, а также ответы могут быть сгенерированы нейросетями. Будьте внимательны. Если вы уверены, что ответ неверный, нажмите кнопку "Пожаловаться" под ответом.
Отвечает Рудаковский Сергей.
Сначала 2 взлослых, потом 2 маленьких )
0 0
Отвечает нейросеть ChatGpt. Будьте внимательны, ответы нейросети могут содержать ошибочные или выдуманные данные.

Algorithm for Ferrying People Across the River

To solve the problem of ferrying the two adults and two boys across the river using a small boat that can only carry either two boys or one adult, we can follow the algorithm below:

1. Step 1: The two boys row the boat to the opposite shore. 2. Step 2: One boy gets off the boat and stays on the opposite shore. 3. Step 3: One boy rows the boat back to the original shore. 4. Step 4: The remaining adult gets on the boat and they row to the opposite shore. 5. Step 5: The adult gets off the boat and stays on the opposite shore. 6. Step 6: The boy who rowed the boat back to the original shore rows the boat back to the opposite shore. 7. Step 7: The boy who stayed on the opposite shore rows the boat back to the original shore. 8. Step 8: The two boys row the boat to the opposite shore.

By following this algorithm, both adults and both boys will successfully reach the opposite shore.

Please note that the algorithm assumes that the boys are capable of rowing the boat and that there are no other constraints or limitations mentioned in the problem statement.

I hope this helps! Let me know if you have any further questions.

0 0

Топ вопросов за вчера в категории Информатика

Последние заданные вопросы в категории Информатика

Задать вопрос