I saw this riddle ealier today on 9GAG (and it's found on multiple news sites), Im not quite sure about the answer, but i'm wondering if someone can solve it.
100 prisoners are lined up by an executioner, who places a red or blue hat upon each of their heads. The prisoners can see the hats of the people lined up in from of them, but they cannot look at the hats behind them, or at their own. Starting at the back of the line, the executioner asks the last prisoner to state the colour of his hat. In order to live, the prisoner must answer correctly. If he doesn't, he is killed 'instantly and silently.' This means that the other prisoners will hear the answer, but will not know whether or not it was correct. The night before the line-up, the prisoners can discuss a strategy to help them survive. What should they do?