Data First

people(xloc,yloc,rescuetime)
38,77,21
17,23,29
17,20,102
15,7,78
84,26,95
64,30,74
25,100,58
68,57,52
39,77,58
58,95,108
56,26,80
75,1,72
1,89,53
66,47,58
18,83,95
5,92,50
71,3,53
18,1,71
64,75,47
62,50,112
87,50,101
99,100,24
22,86,80
58,15,87
82,67,56
65,92,27
17,100,25
35,57,39
69,100,59
99,93,37
86,9,116
99,83,76
69,72,37
24,65,56
95,99,99
3,69,102
100,62,106
2,26,87
38,41,69
74,11,96
54,93,60
29,42,67
30,50,73
82,55,74
36,57,55
25,53,34
58,41,85
7,20,20
98,88,51
89,27,29

hospital(xloc,yloc,numambulance)
45,32,3
59,68,5
37,52,6
36,50,3
39,5,5

Tyler Neylon's solution:


Hi,
  I've verified the output of my program, which appears to be correct 
with a score of 26.  In some cases, the patient is dropped off and runs 
out of time to live exactly after the ambulance is done with him or her 
(including pick-up and delivery delays).  I hope that is ok.
  Below is the output of the program -- the lists represent the order in 
which the ambulance goes to each place.  Nonnegative numbers are indices 
into the people list (same order as in the file tmp) and -1 indicates 
the hospital.

See you Tuesday!  (or the next Tuesday, for some)
  Tyler

Ambulance 0 based at (45, 32):
-1, 46, 19, -1
Ambulance 1 based at (45, 32):
-1, 10, 5, -1
Ambulance 2 based at (45, 32):
-1, 4, -1
Ambulance 3 based at (59, 68):
-1, 43, -1
Ambulance 4 based at (59, 68):
-1, 24, -1
Ambulance 5 based at (59, 68):
-1, 18, 32, -1, 9, -1
Ambulance 6 based at (59, 68):
-1, 7, -1
Ambulance 7 based at (59, 68):
-1, 13, -1
Ambulance 8 based at (37, 52):
-1, 44, 27, -1, 42, 41, -1
Ambulance 9 based at (37, 52):
-1, 38, -1
Ambulance 10 based at (37, 52):
-1, 33, -1
Ambulance 11 based at (37, 52):
-1, 8, -1
Ambulance 12 based at (37, 52):
-1, 45, -1
Ambulance 13 based at (37, 52):
-1
Ambulance 14 based at (36, 50):
-1, 2, -1
Ambulance 15 based at (36, 50):
-1
Ambulance 16 based at (36, 50):
-1
Ambulance 17 based at (39, 5):
-1, 17, 3, -1
Ambulance 18 based at (39, 5):
-1, 23, -1
Ambulance 19 based at (39, 5):
-1, 39, -1
Ambulance 20 based at (39, 5):
-1, 30, -1
Ambulance 21 based at (39, 5):
-1
 ===== Total score: 26