4 1 4 2 1 0 2 0 3 1 7 2 200 1 200 1 100 0 1000 2 80 1 50 20 500 1 0 100 1 0 4 1000