| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 9 | 6 | 6 | 75.000% |
After breaking into the database of the TU Delft and releasing sensitive information to the public, Anton the cyber criminal got the CIA looking for him. After being arrested, Anton was transported to the heavily guarded prison Alcatraz. Disabling the security system was a piece of cake, so he could easily get outside of the prison walls. However, behind these walls a number of guards are positioned and they will immediately sound the alarm if they spot any escaped prisoner.
To escape, Anton needs to cross a field with width $w$ and height $h$ that is being guarded by $n$ guards, without being spotted by any of the guards. He starts at position $(0,0)$ and can only escape if he reaches position $(w,h)$ without being spotted. Even if the criminal is only spotted at position $(n,n)$ the guards will sound the alarm and he will be captured. Some guards have better views that others, so every guard $i$ has an associated range of view $r_i$. If the distance between the guard and the escaped prisoner is $r_i$ or less, the guard will sound the alarm and the prisoner will return to his cell.
Your job is now to find out whether Anton can escape Alcatraz or if he cannot escape without being spotted. If he can escape, output ESCAPE. Otherwise output NO ESCAPE.
ESCAPE if the prisoner can escape Alcatraz, NO ESCAPE otherwise.
5 5 3 3 1 2 3 5 1 1 4 1
ESCAPE
5 5 3 3 1 2 3 4 1 1 4 1
NO ESCAPE