In the puzzle Four people on a Bridge we met four people who needed to cross a bridge at night. In this puzzle, there are five people who must cross two sequential bridges at night. As in the original puzzle, there are some hindrances:
The bridges can only support two people crossing at a time.
Each person has a different speed in which they can cross: 10 minutes, 7 minutes, 5 minutes, 2 minutes, and 1 minute.
They have only two flashlights to share among them.
What is the shortest amount of time it will take for all five people to cross both bridges?