Teachers and parrents

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
10 5
 got on 
4 3
2 7
8 1
0 0
 in bus
2 3
2 10
 altogether
10


Solution

 
A
B
C
D
E
 got off 
0 0
0 2
6 1
0 6
10 5
 got on 
2 3
4 3
2 7
8 1
0 0
 in bus
2 3
6 4
2 10
10 5
 altogether
5
10
12
15


Solve exercises