5 4
0 1 2 3 4
1 1 1 1
