3 100
2 0 10 100 300
3 1 8  500 1000
5 0 12 300 600