Four friends are trying to cross a bridge in complete darkness, but have only one flashlight. They need respectively 1, 2, 7, and 10 minutes to cross the bridge, and if any three of them step on the bridge at the same time, it will collapse. How many minutes they need at least in order all of them to get to the other side?
They need 17 minutes. Label the friends A (1min), B (2min), C (7min), D (10min). A and B cross the bridge, then A returns back with the flashlight. C and D cross the bridge, then B returns back with the flashlight. Finally, A and B cross the bridge.
In order to see that this is optimal, notice that when D crosses, he needs at least 10 minutes. If C crosses separately, this will make already 17 minutes in total. Therefore C and D must cross together, and A and B must be at that time on the two opposite sides of the bridge. From here it is easy to conclude that the friends indeed need at least 17 minutes.