📜 ⬆️ ⬇️

We continue to solve "simple" tasks

Yesterday, in the comments to my yesterday’s topic, some people said that the solution of the problem of two colors of caps can be summarized.

Task
The vile invaders did not like that they killed very few people in the village of Mega Brains, and so they decided to complicate the task, they also took 100 Mega Brains, put them in a column one after another, so that each previous one sees all the subsequent ones. But this time they took caps of seven colors (red, orange, yellow, green, blue, blue, violet), put them on Mega Brains, so that every MegMind does not see its cap. Starting from the very last (the one who sees everyone but himself), each MegaMann is asked to ask the color of his hat, if he makes a mistake, they kill him. But as always, Mega Brains agreed in advance how to minimize the number of dead. What did Mega Brains agree on?


Please describe in detail what the prisoners must agree on so that everyone is guaranteed to live except one.

')

Source: https://habr.com/ru/post/15556/


All Articles