100 prisoners are placed in a prison. The warden tells them:
"I will give you an evening to talk with each other, and then I will place you in separate cells, and you will no longer be able to communicate. Occasionally, I will take one of you to a room that contains a lamp (initially turned off). When you leave the room, you can leave the lamp either on or off.
If at some point one of you tells me that all of you have already been in the room and it is true, then I will set you all free. If you are wrong, I will feed you all to the crocodiles. Don't worry about anyone being forgotten - if you remain silent, then everyone will eventually visit the room, and no one's visit to the room will be their last."
Devise a strategy that guarantees the prisoners' release.