Alas, no. I got it from this:
http://www.math.vt.edu/people/brown/doc/dozen_hats.pdfThere is an extremely famous hat puzzle (PLEASE don't google it if you haven't already seen it - the problem is too nice to spoil by looking up the solution) which I shall give below:
Four prisoners; four hats. They are buried in the sand as shown below:
A-->B-->C-->WALL<--D
R---B---R----------------B
A is wearing a red hat and can see B and C. He can't see D because there is a wall in the way.
B is wearing a blue hat and can see C. He can't see A or D.
C is wearing a red hat, and can't see anyone else.
D is wearing a blue hat, and can't see anyone else.
They are told that each prisoner is wearing either a red or blue hat,
and that there are two of each. They are not allowed to communicate in any way. They are told that if, within 10 minutes, one of them correctly guesses the colour of their hat, then they will be released. If more than 10 minutes go by, or anybody guesses incorrectly, then they will all be executed.
After 9 minutes, one of them correctly states the colour of his hat. Who was it, and how did he know?