Showing posts with label bit_manipulation. Show all posts
Showing posts with label bit_manipulation. Show all posts

Thursday, 18 September 2014

Puzzle #5: Save the king

Problem: There are 500 barrels of wine and exactly one of them is poisoned. The king wants to identify the poisoned barrel but he is ready to sacrifice only 4 prisoners. They have 4 days to find the poisoned barrel. The poison has the property that after consuming it one can die anytime in the next 24hrs. Give the strategy to find the poisoned barrel.

Source: Shahbaz  also CSE blog