Instructions:
The table describes the number of passengers entering and leaving at stations A, B, C ... Bus arrives without passengers at the first station. All passengers get off on the last station. We do keep rules of decency - first get off and then get in.
Example
A
B
C
D
E
got off
0 0
6 5
got on
6 2
4 3
4 4
0 0
in bus
3 7
8 4
altogether
14
Solution
A
B
C
D
E
got off
0 0
0 4
5 4
6 3
6 5
got on
3 7
6 2
4 3
4 4
0 0
in bus
3 7
9 5
8 4
6 5
altogether
10
14
12
11