All-pairs shortest paths on a line: simple O(n²) algorithm for a line graph.

Analyze the all-pairs shortest paths on a line: simple o(n²) algorithm for a line graph..

Examples
Input: "test_input_1"
Output: "output_1"
Hints

All-pairs shortest paths on a line: simple O(n²) algorithm for a line graph.

Analyze the all-pairs shortest paths on a line: simple o(n²) algorithm for a line graph..