+
+
+ 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
+ 10 and height 10 that is being guarded by 3 guards.
+ He starts
+ at position (0, 0) and can only escape if he reaches
+ position (10, 10) without being spotted. Some
+ guards have better views than others, so every of
+ the three guards has an associated range of view.
+ If the distance between Anton and a guard is less
+ than that guard's view range,
+ then the guard will sound the alarm and Anton
+ 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.
+
+
+
Input
+
+ A file containing multiple setups of initial positions for the
+ three guards. One setup consists of three lines with
+ each line containing a guard's X, Y, and view radius R as
+ integers from 1-9.
+
+
Output
+
+ A string containing a character 0 or 1 for each setup. If
+ it is possible to escape the setup, then the
+ character is a 1, else 0. Your output should contain
+ lines/3 characters.
+
+
+
Samples
+
+
+ Sample Input |
+ Sample Output |
+ |
+
+
+ 8 2 7
+ 5 3 2
+ 4 5 1
+ |
+
+ 1
+ |
+
+
+
+ 5 7 2
+ 2 8 5
+ 6 1 2
+ 5 8 3
+ 5 9 3
+ 8 9 1
+ |
+
+ 11
+ |
+
+
+
Final Test
+
+
+ Input |
+ Next Puzzle |
+
+
+
+ cases.txt
+ |
+
+ https://chipcie.wisv.ch/fpc/<OUTPUT>
+ |
+
+
+