Four men want to cross a bridge. They all begin on the same side. It is night, and they have only one flashlight with them. At most two men can cross the bridge at a time, and any party who crosses, either one or two people, must have the flashlight with them.
The flashlight must be walked back and forth: it cannot be thrown, etc. Each man walks at a different speed. A pair must walk together at the speed of the slower man. Man 1 needs 1 minute to cross the bridge, man 2 needs 2 minutes, man 3 needs 5 minutes, and man 4 needs 10 minutes. For example, if man 1 and man 3 walk across together, they need 5 minutes.
How can all four men cross the bridge in 17 minutes?