Police Investigation 3 (police3)

184 teams scored 5595 points on this task, for a maximum score of 100, an average score of 30 and a median score of 15.

Highlights

  1. Galileo Ferraris, Molfetta is the institute with the most points (315).
  2. Lombardia is the region with the most points (1020).

Statement

After his traditional Friday's bank robbery, fearsome William is running away trying to reach his nest. As the police is already wary on Terror Street and Crime Avenue, he decides to go through Heist Road instead, which unfortunately is full of traffic lights. Being so unlucky, he knows that he will have to stop to all the N traffic lights in his way, spending T_i minutes at each of them. The police is on his way, and he really needs to hurry up, so he decides to jump a few red lights. Jumping a red light is both dangerous, and it can attract unwanted attention to him, therefore he decides to never skip two consecutive traffic lights. This means that when he reaches a traffic light, he can go through it without stopping, but then he will have to stop to the next one. What is the minimum amount of time he has to spend waiting at the traffic lights?