-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy patht10-straight-line.out
64 lines (53 loc) · 1.13 KB
/
t10-straight-line.out
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
The input data is:
A
B 3 mi via bridge
B
A 3 mi via bridge
C 6 mi
C
B 6 mi
D 9 mi via bridge
D
C 9 mi via bridge
E 12 mi
E
D 12 mi
The shortest paths from A are:
The shortest path from A to B is 3 mi:
A
B
The shortest path from A to C is 9 mi:
A
B
C
The shortest path from A to D is 18 mi:
A
B
C
D
The shortest path from A to E is 30 mi:
A
B
C
D
E
The road upgrading goal can be achieved at minimal cost by upgrading:
A to B
B to C
C to D
D to E
Connected components in event of a major storm are:
If all bridges fail, the following towns would form an isolated group:
A
If all bridges fail, the following towns would form an isolated group:
B
C
If all bridges fail, the following towns would form an isolated group:
D
E
Destruction of any of the following would result in the province becoming
disconnected:
D
C
B
------------------------------------------------------------------