Diferente pentru problema/police intre reviziile #3 si #2

Nu exista diferente intre titluri.

Diferente intre continut:

h3. Explicaţie
In the first sample case there are 3 semaphores, of which 1 can be skipped. When William reaches the first semaphore he finds it green, so it will pass.
In the \textbf{first sample case} there are 3 semaphores, of which 1 can be skipped. When William reaches the first semaphore he finds it green, so it will pass.
Then at $t=5$ he reaches the second semaphore (at $x=5$), but it is red (since $t=3$).
He has two choices: wait 1 second that it becomes green, or skip the semaphore.
If he waits, he will start again at $t=6$, will reach the last semaphore (at $t=10$) and will skip it since it is red and he still has $1$ skip remaining. He reaches his nest at $t=11$.
 
If he skips it, he will reach the last semaphore at $t=9$, but it is red (it just became red). There he has to wait 3 seconds that it becomes green again, leaving it at $t=12$. He reaches his nest at $t=13$.
\begin{itemize}
    \item If he waits, he will start again at $t=6$, will reach the last semaphore (at $t=10$) and will skip it since it is red and he still has $1$ skip remaining.
    He reaches his nest at $t=11$.
 
    \item If he skips it, he will reach the last semaphore at $t=9$, but it is red (it just became red).
    There he has to wait 3 seconds that it becomes green again, leaving it at $t=12$.
    He reaches his nest at $t=13$.
\end{itemize}
Therefore, the best solution is to wait at the second semaphore and skip the last one, reaching the nest in 11 seconds.
In the second sample case there is only one semaphore.
In the \textbf{second sample case} there is only one semaphore.
When William reaches it he finds it red (it just became red), and he will wait since he doesn't have any skip available.

Nu exista diferente intre securitate.

Topicul de forum nu a fost schimbat.