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
1 5
5 2
got on
7 1
3 4
1 1
0 0
in bus
8 3
3 3
altogether
Solution
A
B
C
D
E
got off
0 0
1 5
5 2
4 3
3 3
got on
2 7
7 1
3 4
1 1
0 0
in bus
2 7
8 3
6 5
3 3
altogether
9
11
11
6