第一行c1,c2,c3,c4,tot下面tot行d1,d2,d3,d4,s,其中di,s ≤ 100000,tot ≤ 1000
每次的方法数
1 2 5 10 2 3 2 3 1 10 1000 2 2 2 900
4 27
对于100%的数据,保证