Hacker News new | comments | show | ask | jobs | submit login

I thought about it for 5 minutes and couldn't find an answer (I found several, but they were all half-answers). I looked at the answer below, and it turned out that you'd missed an important part: The prisoners don't die immediately after drinking from a poisoned barrel... They die after 30 days (in other words, they can drink from several barrels, and if any of those barrels were poisoned, they'd die).

But thanks anyway.

You also need to specify that you need to know by 30 days. Without both restrictions a simple binary search works.

Or your allow a cocktail to be made from the contents of several barrels.

Ya, that's correct :) It doesn't make much sense otherwise I guess...

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact